| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
|
|
For now, this is all the crate contains, but more
attribute logic & types will be moved there over time.
|
|
|
|
Address inconsistency in using "is" with "declared here"
"is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout.
r? @Centril
|
|
|
|
|
|
|
|
|
|
Make conflicting_repr_hints a deny-by-default c-future-compat lint
Closes https://github.com/rust-lang/rust/issues/68428.
cc https://github.com/rust-lang/rust/issues/68585.
r? @petrochenkov @pnkfelix
|
|
Local is copy
r? @oli-obk
|
|
Fix a few spelling mistakes
|
|
pnkfelix:issue-62649-dont-ice-on-path-collision-in-dep-graph, r=michaelwoerister
Don't ICE on path-collision in dep-graph
Collisions in the dep-graph due to path-reuse are rare but can occur.
So, instead of ICE'ing, just fail to mark green in such cases (for `DepKind::{Hir, HirBody, CrateMetadata}`).
Fix #62649.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So, instead of ICE'ing, just fail to mark green in such cases
(for `DepKind::{Hir, HirBody, CrateMetadata}`).
Fix #62649.
|
|
|
|
|
|
Use better bound names in `-Zverbose` mode
r? @petrochenkov as per https://github.com/rust-lang/rust/pull/67951/files#r365524015
|
|
Further improve `impl Trait`/`dyn Trait` suggestions
After reading [_Returning Trait Objects_ by Bryce Fisher-Fleig](https://bryce.fisher-fleig.org/blog/returning-trait-objects/), [I noticed that](https://www.reddit.com/r/rust/comments/esueur/returning_trait_objects/ffczl4k/) #68195 had a few bugs due to not ignoring `ty::Error`.
- Account for `ty::Error`.
- Account for `if`/`else` and `match` blocks when pointing at return types and referencing their types.
- Increase the multiline suggestion output from 6 lines to 20.
|
|
Don't use spaces before type ascription like colons
Split out of #67133 to make that PR simpler
r? @eddyb
|
|
perf: Avoid creating a SmallVec if nothing changes during a fold
Not sure if this helps but in theory it should be less work than what
the current micro optimization does for `ty::Predicate` lists.
(It would explain the overhead I am seeing from `perf`.)
|
|
|
|
Render const pointers in MIR more compactly
Split out from #67133 to make that PR simpler
cc @RalfJung
r? @eddyb
|
|
|
|
Suggest to shorten temporary borrow from raw pointer
Closes https://github.com/rust-lang/rust/issues/65436
r? @estebank
cc @tmandry
|
|
Print constants in `type_name` for const generics
Fixes https://github.com/rust-lang/rust/issues/65372.
r? @oli-obk as there may have been a deliberate decision not to in https://github.com/rust-lang/rust/commit/5b9848912a85e28d000602fc2e81bad9c2f2a981#diff-4ed1a72c0bfdf17be769ed520932cd02R80.
|
|
|
|
|
|
No longer suggest `Box::new(if foo { Type1 } else { Type2 })`, instead
suggesting `if foo { Box::new(Type1) } else { Box::new(Type2) }`.
|
|
|
|
|
|
|
|
Also share drop-glue when compiling with -Zshare-generics (i.e. at opt-level=0)
This PR adds drop-glue to the set of monomorphizations that can be shared across crates via `-Zshare-generics`.
This version of the PR might have detrimental effects on performance as it makes lots of stuff dependent on a single query results (`upstream_monomorphizations_for(def_id_of_drop_in_place)`). That should be fixable but let's do a perf run first.
Potentially fixes issue https://github.com/rust-lang/rust/issues/64140. (cc @alexcrichton)
The changes here are related to @matthewjasper's https://github.com/rust-lang/rust/pull/67332 but should be mostly orthogonal.
r? @ghost
|
|
|
|
This reduces the amount of invalidated data when new types are
add to upstream crates.
|
|
|
|
names.
|
|
|
|
Previously, we used a plain `Predicate` to cache results (e.g. successes
and failures) in ObligationForest. However, fulfillment depends on the
precise `ParamEnv` used, so this is unsound in general.
This commit changes the impl of `ForestObligation` for
`PendingPredicateObligation` to use `ParamEnvAnd<Predicate>` instead of
`Predicate` for the associated type. The associated type and method are
renamed from 'predicate' to 'cache_key' to reflect the fact that type is
no longer just a predicate.
|
|
Fix try-op diagnostic in E0277 for methods
For methods the try-op diagnostic displays the empty string where
it has more descriptive strings like “a function” otherwise:
error[E0277]: the `?` operator can only be used in that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
^^
| | ^^ cannot use the `?` operator in that returns `()`
^^
I’m seeing this on nightly (rustc 1.42.0-nightly (b5a3341f1
2020-01-20)) and [on the playpen](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0e7ce7792c2aceb8056941710d539124).
The changeset add strings for impl methods and trait provided
methods and test cases for the option type.
|
|
Make `TooGeneric` error in WF checking a proper error
`TooGeneric` is encountered during WF checking when we cannot determine that a constant involving a generic parameter will always be evaluated successfully (rather than resulting in an error). In these cases, the burden of proof should be with the caller, so that we can avoid post-monomorphisation tim errors (which was the previous previous behaviour). This commit ensures that this situation produces a proper compiler error, rather than silently ignoring it or ICEing.
Fixes https://github.com/rust-lang/rust/issues/66962.
r? @eddyb
|
|
Adds a compiler option to allow rustc compile a crate without linking.
With this flag, rustc serializes codegen_results into a .rlink file.
|