Rollup merge of #75459 - RalfJung:local-info, r=oli-obk
fix LocalInfo doc comment
The doc comment makes it sound like this is diagnostics-only, but that is not true -- even [unsafety checking uses this information](ded20c98be/src/librustc_mir/transform/check_unsafety.rs (L206)
), so it is crucial for soundness, not just "nice to have".
Cc @oli-obk
This commit is contained in:
commit
c76259a937
1 changed files with 6 additions and 3 deletions
|
@ -857,9 +857,12 @@ pub struct LocalDecl<'tcx> {
|
|||
#[cfg(target_arch = "x86_64")]
|
||||
static_assert_size!(LocalDecl<'_>, 56);
|
||||
|
||||
/// Extra information about a some locals that's used for diagnostics. (Not
|
||||
/// used for non-StaticRef temporaries, the return place, or anonymous function
|
||||
/// parameters.)
|
||||
/// Extra information about a some locals that's used for diagnostics and for
|
||||
/// classifying variables into local variables, statics, etc, which is needed e.g.
|
||||
/// for unsafety checking.
|
||||
///
|
||||
/// Not used for non-StaticRef temporaries, the return place, or anonymous
|
||||
/// function parameters.
|
||||
#[derive(Clone, Debug, RustcEncodable, RustcDecodable, HashStable, TypeFoldable)]
|
||||
pub enum LocalInfo<'tcx> {
|
||||
/// A user-defined local variable or function parameter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue