| Age | Commit message (Collapse) | Author | Lines |
|
rustdoc: Fix visibility of trait and impl items
Fixes #81274.
r? `@jyn514`
|
|
Fix <unknown> queries and add more timing info to render_html
Closes https://github.com/rust-lang/rust/issues/81251.
## Fix `<unknown>` queries
This happened because `alloc_query_strings` was never called.
## Add more timing info to render_html
This still has some issues I'm not sure how to work out:
- `create_renderer` and `renderer_after_krate` aren't shown by default.
I want something like `verbose_generic_activity_with_arg`, but it doesn't exist.
I'm also not sure how to show activities that aren't on by default - I
tried `-Z self-profile -Z self-profile-args=all`, but it didn't show up.
r? `@wesleywiser`
|
|
Lower closure prototype after its body.
Fixes #79537.
r? `@Mark-Simulacrum`
|
|
Update cargo
5 commits in a73e5b7d567c3036b296fc6b33ed52c5edcd882e..783bc43c660bf39c1e562c8c429b32078ad3099b
2021-01-12 23:45:39 +0000 to 2021-01-20 19:02:26 +0000
- Fix some issues with `cargo doc` and the new feature resolver. (rust-lang/cargo#9077)
- Implement support for rust-version field in project metadata (rust-lang/cargo#8037)
- Fix a bug in Cargo's cyclic dep graph detection (rust-lang/cargo#9075)
- Typo correction: artifcats -> artifacts (rust-lang/cargo#9081)
- Remove stray backtick from doc (rust-lang/cargo#9079)
|
|
mir: Improve size_of handling when arg is unsized
As discussed on Zulip with `@RalfJung.`
|
|
This avoids each tool having to separately find and call
`self_profile_alloc_strings`.
- Don't compute the global context if it hasn't yet been computed
This avoids giving extraneous errors about unresolved names if an error
occurs during parsing.
|
|
- Show `create_renderer` and `renderer_after_crate` by default
- Don't rewrite `extra_verbose_generic_activity`
|
|
avoid promoting division, modulo and indexing operations that could fail
For division, `x / y` will still be promoted if `y` is a non-zero integer literal; however, `1/(1+1)` will not be promoted any more.
While at it, also see if we can reject promoting floating-point arithmetic (which are [complicated](https://github.com/rust-lang/unsafe-code-guidelines/issues/237) so maybe we should not promote them).
This will need a crater run to see if there's code out there that relies on these things being promoted.
If we can land this, promoteds in `fn`/`const fn` cannot fail to evaluate any more, which should let us do some simplifications in codegen/Miri!
Cc https://github.com/rust-lang/rfcs/pull/3027
Fixes https://github.com/rust-lang/rust/issues/61821
r? `@oli-obk`
|
|
Improve diagnostics when parsing angle args
https://github.com/rust-lang/rust/pull/79266 introduced parsing of generic arguments in associated type constraints, this however resulted in possibly very confusing error messages in cases in which closing angle brackets were missing such as in `Vec<(u32, _, _) = vec![]`, which outputs an incorrectly parsed equality constraint error, as noted by `@cynecx.`
This PR tries to provide better error messages in such cases.
r? `@petrochenkov`
|
|
|
|
This happened because `alloc_query_strings` was never called.
|
|
Add setgroups to std::os::unix::process::CommandExt
Should fix #38527. I'm not sure groups is the greatest name though.
|
|
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- #80573 (Deny rustc::internal lints for rustdoc and clippy)
- #81173 (Expand docs on Iterator::intersperse)
- #81194 (Stabilize std::panic::panic_any.)
- #81202 (Don't prefix 0x for each segments in `dbg!(Ipv6)`)
- #81225 (Make 'docs' nullable in rustdoc-json output)
- #81227 (Remove doctree::StructType)
- #81233 (Document why not use concat! in dbg! macro)
- #81236 (Gracefully handle loop labels missing leading `'` in different positions)
- #81241 (Turn alloc's force_expr macro into a regular macro_rules.)
- #81242 (Enforce statically that `MIN_NON_ZERO_CAP` is calculated at compile time)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Gracefully handle loop labels missing leading `'` in different positions
Fix #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.
|
|
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`
|
|
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'.
|
|
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)
|
|
Combine instructions immediately
|
|
require gat substs to be invariant
fixes #69184, fixes #80766
r? `@matthewjasper` probably
|
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Ashley Mannix <kodraus@hey.com>
|
|
|
|
Fix formatting for removed lints
- Don't add backticks for the reason a lint was removed. This is almost
never a code block, and when it is the backticks should be in the reason
itself.
- Don't assume clippy is the only tool that needs to be checked for
backwards compatibility
I split this out of https://github.com/rust-lang/rust/pull/80527/ because it kept causing tests to fail, and it's a good change to have anyway.
r? `@flip1995`
|
|
|
|
|
|
When encountering the following typo:
```rust
a: loop { break 'a; }
```
provide an appropriate suggestion.
|
|
|
|
|
|
Point at loop head on invalid `break expr`.
Suggest removing `expr` or using label if available.
|
|
|
|
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.
|
|
|
|
|
|
|
|
Force token collection to run when parsing nonterminals
Fixes #81007
Previously, we would fail to collect tokens in the proper place when
only builtin attributes were present. As a result, we would end up with
attribute tokens in the collected `TokenStream`, leading to duplication
when we attempted to prepend the attributes from the AST node.
We now explicitly track when token collection must be performed due to
nomterminal parsing.
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- #79655 (Add Vec visualization to understand capacity)
- #80172 (Use consistent punctuation for 'Prelude contents' docs)
- #80429 (Add regression test for mutual recursion in obligation forest)
- #80601 (Improve grammar in documentation of format strings)
- #81046 (Improve unknown external crate error)
- #81178 (Visit only terminators when removing landing pads)
- #81179 (Fix broken links with `--document-private-items` in the standard library)
- #81184 (Remove unnecessary `after_run` function)
- #81185 (Fix ICE in mir when evaluating SizeOf on unsized type)
- #81187 (Fix typo in counters.rs)
- #81219 (Document security implications of std::env::temp_dir)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix ICE in mir when evaluating SizeOf on unsized type
Not quite ready yet. This tries to fix #80742 as discussed on [Zulip topic][1],
by using `delay_span_bug`.
I don't understand what `delay_span_bug` does. It seems like my error message
is never used. With this patch, in this program:
```rust
#![allow(incomplete_features)]
#![feature(const_evaluatable_checked)]
#![feature(const_generics)]
use std::fmt::Debug;
use std::marker::PhantomData;
use std::mem::size_of;
struct Inline<T>
where
[u8; size_of::<T>() + 1]: ,
{
_phantom: PhantomData<T>,
buf: [u8; size_of::<T>() + 1],
}
impl<T> Inline<T>
where
[u8; size_of::<T>() + 1]: ,
{
pub fn new(val: T) -> Inline<T> {
todo!()
}
}
fn main() {
let dst = Inline::<dyn Debug>::new(0); // line 27
}
```
these errors are printed, both for line 27 (annotated line above):
- "no function or associated item named `new` found for struct `Inline<dyn
Debug>` in the current scope"
- "the size for values of type `dyn Debug` cannot be known at compilation time"
Second error makes sense, but I'm not sure about the first one and why it's
even printed.
Finally, I'm not sure about the span passing in `const_eval`.
[1]: https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Help.20fixing.20.2380742
|
|
Remove unnecessary `after_run` function
It's called at the same time and in the same place as `after_krate`, so
they can be combined.
|
|
Improve unknown external crate error
This improves error messages when unknown items in the crate root are encountered.
Fixes #63799
r? ```@estebank```
|