rust/compiler/rustc_mir_transform/src
Matthias Krüger 6535e66fa5
Rollup merge of #109641 - compiler-errors:dont-elaborate-non-obl, r=oli-obk
Don't elaborate non-obligations into obligations

It's suspicious to elaborate a `PolyTraitRef` or `Predicate` into an `Obligation`, since the former does not have a param-env associated with it, but the latter does. This is a footgun that, while not being misused *currently* in the compiler, easily could be misused by someone less familiar with the elaborator's inner workings.

This PR just changes the API -- ideally, the elaborator wouldn't even have to deal with obligations if we're not elaborating obligations, but that would require a bit more abstraction than I could be bothered with today.
2023-03-27 08:46:55 +02:00
..
coverage Auto merge of #108794 - nnethercote:avoid-unnecessary-hashing, r=cjgillot 2023-03-12 06:48:30 +00:00
inline Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
abort_unwinding_calls.rs Remove DropAndReplace terminator 2023-03-07 14:25:22 +01:00
add_call_guards.rs
add_moves_for_packed_drops.rs Remove DropAndReplace terminator 2023-03-07 14:25:22 +01:00
add_retag.rs Remove DropAndReplace terminator 2023-03-07 14:25:22 +01:00
check_const_item_mutation.rs Wrap the whole LocalInfo in ClearCrossCrate. 2023-03-14 20:52:42 +01:00
check_packed_ref.rs Properly check for builtin derives 2023-02-16 19:44:03 +00:00
check_unsafety.rs Wrap the whole LocalInfo in ClearCrossCrate. 2023-03-14 20:52:42 +01:00
cleanup_post_borrowck.rs Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
const_debuginfo.rs
const_goto.rs Disable ConstGoto opt in cleanup blocks 2023-01-26 03:50:37 -08:00
const_prop_lint.rs Don't elaborate non-obligations into obligations 2023-03-26 20:33:54 +00:00
const_prop.rs Don't elaborate non-obligations into obligations 2023-03-26 20:33:54 +00:00
copy_prop.rs Rename many interner functions. 2023-02-24 07:32:24 +11:00
ctfe_limit.rs don't into self 2023-02-16 18:30:25 +01:00
dataflow_const_prop.rs Add a layout argument to enforce_validity. 2023-03-21 08:52:31 +00:00
dead_store_elimination.rs Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
deduce_param_attrs.rs Use local key in providers 2023-03-21 15:38:51 +00:00
deduplicate_blocks.rs
deref_separator.rs Wrap the whole LocalInfo in ClearCrossCrate. 2023-03-14 20:52:42 +01:00
dest_prop.rs Remove LocalKind::Var. 2023-03-14 20:52:42 +01:00
dump_mir.rs Auto merge of #105220 - oli-obk:feeding, r=cjgillot 2022-12-06 03:47:41 +00:00
early_otherwise_branch.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
elaborate_box_derefs.rs Rename many interner functions. 2023-02-24 07:32:24 +11:00
elaborate_drops.rs Remove DropAndReplace terminator 2023-03-07 14:25:22 +01:00
ffi_unwind_calls.rs LocalCrate key 2023-03-21 15:38:52 +00:00
function_item_references.rs if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
generator.rs Use local key in providers 2023-03-21 15:38:51 +00:00
inline.rs Auto merge of #109626 - matthiaskrgr:rollup-k0y7bdd, r=matthiaskrgr 2023-03-26 12:05:38 +00:00
instcombine.rs Remove duplicate switch targets 2023-03-18 14:29:13 -04:00
large_enums.rs Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
lib.rs Use local key in providers 2023-03-21 15:38:51 +00:00
lower_intrinsics.rs Add CastKind::Transmute to MIR 2023-03-22 15:15:41 -07:00
lower_slice_len.rs Match unmatched backticks in comments in compiler/ 2023-03-03 08:39:00 +01:00
match_branches.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
multiple_return_terminators.rs
normalize_array_len.rs Remove obsolete comment. 2023-01-29 22:09:51 +00:00
nrvo.rs Remove LocalKind::Var. 2023-03-14 20:52:42 +01:00
pass_manager.rs Use zero based indexing for pass_count 2022-12-02 15:55:24 +00:00
remove_noop_landing_pads.rs Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
remove_storage_markers.rs
remove_uninit_drops.rs Remove DropAndReplace terminator 2023-03-07 14:25:22 +01:00
remove_unneeded_drops.rs
remove_zsts.rs Generalize operation. 2023-03-13 18:22:55 +00:00
required_consts.rs
reveal_all.rs
separate_const_switch.rs Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
shim.rs Refactor: VariantIdx::from_u32(0) -> FIRST_VARIANT 2023-03-25 18:58:25 -07:00
simplify_branches.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
simplify_comparison_integral.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
simplify.rs Explain how we get to skip checking for cleanup blocks in the visitor 2023-03-25 13:58:49 -04:00
sroa.rs Erase lifetimes in SROA. 2023-03-05 18:35:30 +00:00
ssa.rs Do not grow assignment_order needlessly. 2023-02-27 20:02:18 +00:00
uninhabited_enum_branching.rs move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
unreachable_prop.rs Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00