Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#14902 Write a MIR lint for rooting analysis #20264

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Temporarily commented out one test

  • Loading branch information
mrowqa committed May 11, 2018
commit fc4c611d25b28a18e5d36ff5b59982c123b8f99d
@@ -239,7 +239,7 @@ impl<'a, 'b, 'tcx> UnrootedCx<'a, 'b, 'tcx> {
// implicit treating it as #[must_root] if and only if T is #[must_root]
// (auto-propagation).
let cx = self.late_cx;
match_def_path(cx, did, &["alloc", "boxed", "Box"]) // -- is ok?
match_def_path(cx, did, &["alloc", "boxed", "Box"]) // -- is ok? // TODO uncomment unit test "ban_box"
|| match_def_path(cx, did, &["alloc", "boxed", "{{impl}}"]) // -- is ok?
|| match_def_path(cx, did, &["alloc", "rc", "Rc"]) // -- is ok?
|| match_def_path(cx, did, &["alloc", "slice", "{{impl}}"]) // -- is ok?
@@ -173,7 +173,7 @@ pub mod unrooted_must_root {
*/
pub fn local_var() {}

/**
/* * // TODO temporarily commented out since Box is temporarily on exception list
```compile_fail
#![feature(plugin)]
#![plugin(script_plugins)]
@@ -188,7 +188,7 @@ pub mod unrooted_must_root {
fn main() {}
```
*/
pub fn ban_box() {}
//pub fn ban_box() {}

/**
```compile_fail
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.