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 10 pull requests #81271

Merged
merged 36 commits into from
Jan 22, 2021
Merged

Rollup of 10 pull requests #81271

merged 36 commits into from
Jan 22, 2021

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jan 22, 2021

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

m-ou-se and others added 30 commits January 19, 2021 21:30
This was already implied because Any: 'static, but this makes it
explicit.
Co-authored-by: Miguel Ojeda <ojeda@users.noreply.github.com>
Previously, it would usually get computed by LLVM, but this enforces it.
Otherwise rust-analyzer doesn't understand vec![].
When encountering a name `a` that isn't resolved, but a label `'a` is
found in the current ribs, only suggest `'a` if this name is the value
expression of a `break` statement.

Solve FIXME.
Point at loop head on invalid `break expr`.
Suggest removing `expr` or using label if available.
When encountering the following typo:

```rust
a: loop { break 'a; }
```

provide an appropriate suggestion.
Deny rustc::internal lints for rustdoc and clippy

- Fix rustc::internal lints for rustdoc
- Deny internal lints only for rustdoc and clippy (previously the lints were ignored for clippy because -Zunstable-options didn't get passed)
Expand docs on Iterator::intersperse

Unstable feature in rust-lang#79524. This expands on the docs to bring them more in line with how other methods of `Iterator` are demonstrated.
Stabilize std::panic::panic_any.

This stabilizes `std::panic::panic_any`.
Don't prefix 0x for each segments in `dbg!(Ipv6)`

Fixes rust-lang#81182
Make 'docs' nullable in rustdoc-json output

Matches the backing better, and makes it so there's a difference between 'empty docs' and 'no docs'.
…n514

Remove doctree::StructType

Also removes it from the Union type, as unions can only ever be 'Plain'. Adds a new StructType to JSON, 'union', as the easiest way to encode the type of a union there. This leaves only one item in doctree, `Module`.

r? `@jyn514`
Document why not use concat! in dbg! macro

Original title: Reduce code generated by `dbg!` macro
The expanded code before/after: <https://rust.godbolt.org/z/hE3j95>.

---

We cannot use `concat!` since `file!` could contains `{` or the expression is a block (`{ .. }`).
Using it will generated malformed format strings.
So let's document this reason why we don't use `concat!` macro at all.
Gracefully handle loop labels missing leading `'` in different positions

Fix rust-lang#81192.

* Account for labels when suggesting `loop` instead of `while true`
* Suggest `'a` when given `a` only when appropriate
* Add loop head span to hir
* Tweak error for invalid `break expr`
* Add more misspelled label tests
* Avoid emitting redundant "unused label" lint
* Parse loop labels missing a leading `'`

Each commit can be reviewed in isolation.
…li-obk

Turn alloc's force_expr macro into a regular macro_rules.

This turns `alloc`'s `force_expr` macro into a regular `macro_rules`.

Otherwise rust-analyzer doesn't understand `vec![]`. See rust-lang/rust-analyzer#7349 and rust-lang#81080 (comment)

Edit: See rust-lang#81241 (comment) for a discussion of alternatives.
Enforce statically that `MIN_NON_ZERO_CAP` is calculated at compile time

Previously, it would usually get computed by LLVM, but this enforces it. This removes the need for the comment saying "LLVM is smart enough".

I don't expect this to make a performance difference, but I do think it makes the performance properties easier to reason about.
@rustbot rustbot added the rollup A PR which is a rollup label Jan 22, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 22, 2021

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Jan 22, 2021

📌 Commit 9c2a577 has been approved by m-ou-se

@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 Jan 22, 2021
@bors
Copy link
Contributor

bors commented Jan 22, 2021

⌛ Testing commit 9c2a577 with merge b814b63...

@bors
Copy link
Contributor

bors commented Jan 22, 2021

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing b814b63 to master...

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.

8 participants