Assert that locals have storage when used
The validator in visit_local asserts that local has a stroage when used, but visit_local is never called so validation is ineffective. Use super_statement and super_terminator to ensure that locals are visited.
This commit is contained in:
parent
4f7612ac14
commit
3b7157dc1a
3 changed files with 23 additions and 11 deletions
|
|
@ -23,6 +23,7 @@ pub trait Receiver { }
|
|||
pub struct Result<T, E> { _a: T, _b: E }
|
||||
|
||||
impl Copy for usize {}
|
||||
impl Copy for &usize {}
|
||||
|
||||
#[lang = "drop_in_place"]
|
||||
pub unsafe fn drop_in_place<T: ?Sized>(_: *mut T) {}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ trait Sized {}
|
|||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
impl Copy for bool {}
|
||||
impl Copy for &bool {}
|
||||
|
||||
#[lang = "freeze"]
|
||||
trait Freeze {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue