| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
r=matthewjasper,oli-obk
Don't run const propagation on items with inconsistent bounds
Fixes #67696
Using `#![feature(trivial_bounds)]`, it's possible to write functions
with unsatisfiable 'where' clauses, making them uncallable. However, the
user can act as if these 'where' clauses are true inside the body of the
function, leading to code that would normally be impossible to write.
Since const propgation can run even without any user-written calls to a
function, we need to explcitly check for these uncallable functions.
|
|
unevaluated consts
which requires a lot of unnecessary work to evaluate them further down the line.
|
|
|
|
Split MIR building into its own crate
This moves `rustc_mir::{build, hair, lints}` to `rustc_mir_build`.
The new crate only has a `provide` function as it's public API.
Based on #67898
cc @Centril @rust-lang/compiler
r? @oli-obk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Suggest type param when encountering `_` in item signatures
Fix #27435.
|
|
|
|
|
|
|
|
|
|
functions with a `const` modifier
|
|
Index impl, remove body fn
rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence
rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
|
|
rename all body_cache back to body
|
|
|
|
(lifetime errors still exist)
|
|
|
|
Making ICEs and test them in incremental
This adds:
- A way to make the compiler ICE
- A way to check for ICE in `cfail` tests with `should-ice`
- A regression test for issue #65401
I am not sure the attribute added `should-ice` is the best for this job
|
|
|
|
|
|
These high-level constructs get mapped to control-flow primitives by the
time the MIR const-checker runs, making it hard to get the span for the
erroneous expression.
|
|
|
|
r=michaelwoerister
De-querify `trivial_dropck_outlives`.
It's sufficiently simple and fast that memoizing it is a slight
pessimization.
r? @michaelwoerister
|
|
|
|
It's sufficiently simple and fast that memoizing it is a slight
pessimization.
|
|
This changes the mechanism of `-Z dual-proc-macro` to record the host
proc macro hash in the transistive dependency information and use it
during dependency resolution instead of resolving only by name.
|
|
|
|
`std::panic::Location` is a lang_item, add `core::intrinsics::caller_location` (RFC 2091 3/N)
[Tracking issue](https://github.com/rust-lang/rust/issues/47809)
[RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md)
@eddyb suggested doing this intrinsic implementation ahead of actually implementing the `#[track_caller]` attribute so that there's an easily tested intermediate step between adding the shim and wiring up the attribute.
|
|
|
|
|
|
This is a straightforward replacement except for two places where we
have to convert to `LocalInternedString` to get a stable sort.
|
|
struct.
|
|
This allows caching some recursive types and getting to an error much
more quickly.
|
|
|
|
|
|
|
|
|
|
reserve `impl<T> From<!> for T`
this is necessary for never-type stabilization.
cc #57012 #35121
I think we wanted a crater run for this @nikomatsakis?
r? @nikomatsakis
|
|
Rustdoc render async function re-export
Closes #63710
r? @nikomatsakis
|
|
|
|
This commit addresses #64319 by removing the `dylib` crate type from the
list of crate type that exports generic symbols. The bug in #64319
arises because a `dylib` crate type was trying to export a symbol in an
uptream crate but it miscalculated the symbol name of the uptream
symbol. This isn't really necessary, though, since `dylib` crates aren't
that heavily used, so we can just conservatively say that the `dylib`
crate type never exports generic symbols, forcibly removing them from
the exported symbol lists if were to otherwise find them.
The fix here happens in two places:
* First is in the `local_crate_exports_generics` method, indicating that
it's now `false` for the `Dylib` crate type. Only rlibs actually
export generics at this point.
* Next is when we load exported symbols from upstream crate. If, for our
compilation session, the crate may be included from a dynamic library,
then its generic symbols are removed. When the crate was linked into a
dynamic library its symbols weren't exported, so we can't consider
them a candidate to link against.
Overally this should avoid situations where we incorrectly calculate the
upstream symbol names in the face of differnet `share_generics` options,
ultimately...
Closes #64319
|
|
This commit converts a field of `Session`, `dependency_formats`, into a
query of `TyCtxt`. This information then also needed to be threaded
through to other remaining portions of the linker, but it's relatively
straightforward. The only change here is that instead of
`HashMap<CrateType, T>` the data structure changed to `Vec<(CrateType,
T)>` to make it easier to deal with in queries.
|
|
|
|
|