about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir/query.rs
AgeCommit message (Collapse)AuthorLines
2023-11-27Print list of missing target features when calling a function with target ↵Eduardo Sánchez Muñoz-3/+10
features outside an unsafe block
2023-11-23remove unused pub fnklensy-58/+0
2023-11-22Replace `custom_encodable` with `encodable`.Nicholas Nethercote-0/+1
By default, `newtype_index!` types get a default `Encodable`/`Decodable` impl. You can opt out of this with `custom_encodable`. Opting out is the opposite to how Rust normally works with autogenerated (derived) impls. This commit inverts the behaviour, replacing `custom_encodable` with `encodable` which opts into the default `Encodable`/`Decodable` impl. Only 23 of the 59 `newtype_index!` occurrences need `encodable`. Even better, there were eight crates with a dependency on `rustc_serialize` just from unused default `Encodable`/`Decodable` impls. This commit removes that dependency from those eight crates.
2023-11-20Rollup merge of #117835 - Nilstrieb:note-object-lifetime-defaults, ↵Matthias Krüger-1/+5
r=compiler-errors Note about object lifetime defaults in does not live long enough error This is a aspect of Rust that frequently trips up people who are not aware of it yet. This diagnostic attempts to explain what's happening and why the lifetime constraint, that was never mentioned in the source, arose. The implementation feels a bit questionable, I'm not sure whether there are better ways to do this. There probably are. fixes #117835 r? types
2023-11-13rename `ReLateBound` to `ReBound`lcnr-2/+2
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-11-12Note about object lifetime defaults in does not live long enough errorNilstrieb-1/+5
This is a aspect of Rust that frequently trips up people who are not aware of it yet. This diagnostic attempts to explain what's happening and why the lifetime constraint, that was never mentioned in the source, arose.
2023-10-20s/generator/coroutine/Oli Scherer-4/+4
2023-10-20s/Generator/Coroutine/Oli Scherer-10/+10
2023-10-18coverage: Store the number of counters/expressions in function coverage infoZalathar-9/+15
Coverage codegen can now allocate arrays based on the number of counters/expressions originally used by the instrumentor. The existing query that inspects coverage statements is still used for determining the number of counters passed to `llvm.instrprof.increment`. If some high-numbered counters were removed by MIR optimizations, the instrumented binary can potentially use less memory and disk space at runtime.
2023-09-24Remove span from BrAnon.Camille GILLOT-2/+1
2023-09-19move ConstValue into mirRalf Jung-2/+1
this way we have mir::ConstValue and ty::ValTree as reasonably parallel
2023-09-18Remove unused `Lift` derives.Nicholas Nethercote-1/+1
I found these by commenting out all `Lift` derives and then adding back the ones that were necessary to successfully compile.
2023-07-30inline format!() args up to and including rustc_middleMatthias Krüger-1/+1
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-4/+4
2023-07-05Specialize `DestructuredConstant` to its one user (pretty printing)Oli Scherer-2/+2
2023-06-19Store generator field names in GeneratorLayout.Camille GILLOT-0/+4
2023-05-29Rename `tcx.mk_re_*` => `Region::new_*`Maybe Waffle-1/+1
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-04-20Remove WithOptconstParam.Camille GILLOT-41/+2
2023-04-06Remove index from BrAnonJack Huey-4/+2
2023-03-28Move `mir::Field` → `abi::FieldIdx`Scott McMurray-6/+6
The first PR for https://github.com/rust-lang/compiler-team/issues/606 This is just the move-and-rename, because it's plenty big-and-bitrotty already. Future PRs will start using `FieldIdx` more broadly, and concomitantly removing `FieldIdx::new`s.
2023-03-17Remove VecMapMichael Goulet-2/+2
2023-03-08Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholkbors-2/+2
Do not implement HashStable for HashSet (MCP 533) This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order. The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-04tweak ClosureOutlivesSubjectTyAli MJ Al-Nasrawy-7/+10
2023-03-03promote subject even if it has unnamed regionsAli MJ Al-Nasrawy-12/+45
Don't require a region to have an `external_name` in order to be promoted.
2023-03-01Remove last instances of HashSet in query result types.Michael Woerister-2/+2
2023-02-14Use derive attributes for uninteresting traversalsAlan Egerton-0/+2
2023-01-27Restrict amount of ignored locals.Camille GILLOT-2/+2
2023-01-27Remember where a type was kept in MIR.Camille GILLOT-1/+10
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-2/+1
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18Make `#[debug_format]` an attribute in `newtype_index`Nilstrieb-1/+1
This removes the `custom` format functionality as its only user was trivially migrated to using a normal format. If a new use case for a custom formatting impl pops up, you can add it back.
2022-12-18Use `#[derive]` instead of custom syntax in all `newtype_index`Nilstrieb-1/+1
2022-10-27Revert "Make ClosureOutlivesRequirement not rely on an unresolved type"Michael Goulet-10/+6
This reverts commit a6b5f95fb028f9feb4a2957c06b35035be2c6155.
2022-10-19Make ClosureOutlivesRequirement not rely on an unresolved typeMichael Goulet-6/+10
2022-09-19`DestructuredConst` split mir and tylcnr-8/+1
2022-09-16Make QueryOutlivesConstraint contain a ConstraintCategoryJack Huey-2/+2
2022-09-16Revert "Better errors for implied static bound"Jack Huey-2/+2
This reverts commit c75817b0a75d4b6b01ee10900ba5d01d4915e6a8.
2022-09-13Better errors for implied static boundJack Huey-2/+2
2022-08-02remove some unused code and typesRalf Jung-20/+2
2022-07-20Remove unused StableMap and StableSet types from rustc_data_structuresMichael Woerister-1/+1
2022-07-19Use LocalDefId in OpaqueTypeKeyMichael Goulet-1/+1
2022-07-13assigning to a union field can never drop nowRalf Jung-6/+0
2022-07-05Add #[derive(TypeVisitable)]Alan Egerton-1/+1
2022-06-14implement valtrees as the type-system representation for constant valuesb-naber-2/+2
2022-05-26rebase, use Ty in CallArgument and re-insert static_assert_size on ↵b-naber-2/+8
ConstraintCategory
2022-05-25add def_id and substs to ConstraintCategory::CallArgumentb-naber-7/+4
2022-05-16use GlobalId in eval_to_valtree query and introduce query for ↵b-naber-2/+9
valtree_to_const_val
2022-04-26Revert "add `DefId` to unsafety violations and display function path in E0133"Oli Scherer-49/+19
This reverts commit 8b8f6653cfd54525714f02efe7af0a0f830e185c.
2022-04-24only show a simple description in E0133 span labelEmil Gardström-11/+32
2022-04-24add `DefId` to unsafety violations and display function path in E0133Emil Gardström-19/+28
this enables consumers to access the function definition that was reported to be unsafe