Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 14 pull requests #76231

Merged
merged 46 commits into from
Sep 2, 2020
Merged

Rollup of 14 pull requests #76231

merged 46 commits into from
Sep 2, 2020

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Sep 2, 2020

Successful merges:

Failed merges:

r? @ghost

chrisduerr and others added 30 commits July 28, 2020 18:42
The most important rule of lexicographical comparison is that two arrays
of equal length will be compared until the first difference occured.

The examples provided only focuses on the second rule that says that the
shorter array will be filled with some T2 that is less than every T.
Which is only possible because of the first rule.
I no longer say "polymorphic" since it's a bit ambiguous here.
In PR rust-lang#76130, I add a fourth field, which makes using a tuple variant
somewhat unwieldy.
This reverts commit 7e2548f.

Now I know why it was redefined: it seems like it's potentially because
of the orphan rule. Here are the error messages:

error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `!`:
 --> src/primitive_docs.rs:236:1
  |
6 | impl Debug for ! {
  | ^^^^^^^^^^^^^^^^
  |
  = note: conflicting implementation in crate `core`:
          - impl std::fmt::Debug for !;

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
 --> src/primitive_docs.rs:236:1
  |
6 | impl Debug for ! {
  | ^^^^^^^^^^^^^^^-
  | |              |
  | |              `!` is not defined in the current crate
  | impl doesn't use only types from inside the current crate
  |
  = note: define and implement a trait or new type instead
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Similar to `-Z dump-mir-graphviz`, this adds the option to write
HTML+CSS files that allow users to analyze the spans associated with MIR
elements (by individual statement, just terminator, or overall basic
block).

This PR was split out from PR rust-lang#76004, and exposes an API for spanview
HTML+CSS files that is also used to analyze code regions chosen for
coverage instrumentation (in a follow-on PR).

Rust compiler MCP rust-lang/compiler-team#278

Relevant issue: rust-lang#34701 - Implement support for LLVMs code coverage
instrumentation
Previously, this would say no such macro existed, but this was
misleading, since the macro _did_ exist, it was just already seen.

- Say where the macro was previously defined
- Add long-form error message
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Make the following methods of `std::net::Ipv6Addr` unstable const under the `const_ipv6` feature:
- `segments`
- `is_unspecified`
- `is_loopback`
- `is_global` (unstable)
- `is_unique_local`
- `is_unicast_link_local_strict`
- `is_documentation`
- `multicast_scope`
- `is_multicast`
- `to_ipv4_mapped`
- `to_ipv4`

Changed the implementation of `is_unspecified` and `is_loopback` to use a `match` instead of `==`.

Part of rust-lang#76205
… from `matches!` to `u128` comparison

Done because `matches!` doesn't optimize well with array comparisons
Fira Sans is what's used for module lists and other item lists.
Previously, the default body font, "Source Serif Pro", was used for
crate lists, which didn't visually match other item lists.
petrochenkov and others added 16 commits September 2, 2020 00:40
Lexer now discerns between regular comments and doc comments, so use that.
The change only affects the choice of reported errors.
Add trailing comma support to matches macro
…5.1, r=wesleywiser

Add new `-Z dump-mir-spanview` option

Similar to `-Z dump-mir-graphviz`, this adds the option to write
HTML+CSS files that allow users to analyze the spans associated with MIR
elements (by individual statement, just terminator, or overall basic
block).

This PR was split out from PR rust-lang#76004, and exposes an API for spanview
HTML+CSS files that is also used to analyze code regions chosen for
coverage instrumentation (in a follow-on PR).

Rust compiler MCP rust-lang/compiler-team#278

Relevant issue: rust-lang#34701 - Implement support for LLVMs code coverage
instrumentation

r? @tmandry
FYI @wesleywiser
Add more examples to lexicographic cmp on Iterators.

Given two arrays of T1 and T2, the most important rule of lexicographical comparison is that two arrays
of equal length will be compared until the first difference occured.

The examples provided only focuses on the second rule that says that the
shorter array will be filled with some T2 that is less than every T1.
Which is only possible because of the first rule.
Add info about `!` and `impl Trait`

Fixes rust-lang#76094.

@rustbot modify labels: T-doc C-enhancement
…eGomez

Use "Fira Sans" for crate list font

Fira Sans is what's used for module lists and other item lists.
Previously, the default body font, "Source Serif Pro", was used for
crate lists, which didn't visually match other item lists.

@rustbot modify labels: T-rustdoc
…nkov

Factor out StmtKind::MacCall fields into `MacCallStmt` struct

In PR rust-lang#76130, I add a fourth field, which makes using a tuple variant
somewhat unwieldy.
…petrochenkov

Give a better error message for duplicate built-in macros

Minor follow-up to rust-lang#75176 giving a better error message for duplicate builtin macros. This would have made it a little easier to debug.

r? @petrochenkov
…trochenkov

Stabilise link-self-contained option

MCP has been accepted: rust-lang/compiler-team#343

I'll add improved heuristic in next PR.
…anic, r=kennytm

Move to intra-doc links for library/core/src/panic.rs

Helps with rust-lang#75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

Known issues:

* Link from `core` to `std` (rust-lang#74481):

    [`set_hook`]
    [`String`]
Make all methods of `std::net::Ipv6Addr` const

Make the following methods of `std::net::Ipv6Addr` unstable const under the `const_ipv6` feature:
- `segments`
- `is_unspecified`
- `is_loopback`
- `is_global` (unstable)
- `is_unique_local`
- `is_unicast_link_local_strict`
- `is_documentation`
- `multicast_scope`
- `is_multicast`
- `to_ipv4_mapped`
- `to_ipv4`

This would make all methods of `Ipv6Addr` const.

Changed the implementation of `is_unspecified` and `is_loopback` to use a `match` instead of `==`, all other methods did not require a change.

All these methods are dependent on `segments`, the current implementation of which requires unstable `const_fn_transmute` ([PR#75085](rust-lang#75085)).

Part of rust-lang#76205
…lone, r=jyn514

# Move to intra-doc links for library/core/src/clone.rs

Helps with rust-lang#75080.

@rustbot modify labels: T-doc, A-intra-doc-links
Document lint missing_doc_code_examples is nightly-only

Closes rust-lang#76194
lexer: Tiny improvement to shebang detection

Lexer now discerns between regular comments and doc comments, so use that.
The change only affects the choice of reported errors.
Clean up header in `iter` docs for `for` loops

@rustbot modify labels: T-doc
@tmandry
Copy link
Member Author

tmandry commented Sep 2, 2020

@bors r+ p=5 rollup=never
@rustbot modify labels: +rollup

@bors
Copy link
Contributor

bors commented Sep 2, 2020

📌 Commit 4dd75f8 has been approved by tmandry

@rustbot rustbot added the rollup A PR which is a rollup label Sep 2, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 2, 2020
@tmandry
Copy link
Member Author

tmandry commented Sep 2, 2020

@bors retry

@bors
Copy link
Contributor

bors commented Sep 2, 2020

⌛ Testing commit 4dd75f8 with merge e36e4bd...

@bors
Copy link
Contributor

bors commented Sep 2, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: tmandry
Pushing e36e4bd to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 2, 2020
@bors bors merged commit e36e4bd into rust-lang:master Sep 2, 2020
@tmandry tmandry deleted the rollup-ilvs9fq branch September 2, 2020 19:21
@cuviper cuviper added this to the 1.48.0 milestone Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet