Repository navigation
use of unstable function is not gated in import list #28075
Copy link
Copy link
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-highHigh priorityHigh priorityT-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Description
Activity
Let's fix soon!
- addedE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
on Aug 28, 2015 - changed the title
[-]`use` of unstable feature is not gated in import list[/-][+]`use` of unstable function is not gated in import list[/+]on Aug 28, 2015 This should be a matter of fixing the appropriate case in
stability.rsand adding a test.This actually applies to all stability attributes and unused feature checks, and it looks like this is a result of
ViewPathListbeing visited as a series of calls tovisit_identfollowed by a call towalk_pathwith only the path prefix. For example, whenuse-ing the deprecatedstd::iter::orderthis way:foo.rs:
#![feature(iter_order)] use std::iter::{order}; fn main() {}
Output:
foo.rs:1:12: 1:22 warning: unused or unknown feature, #[warn(unused_features)] on by default foo.rs:1 #![feature(iter_order)] ^~~~~~~~~~ foo.rs:3:17: 3:22 warning: unused import, #[warn(unused_imports)] on by default foo.rs:3 use std::iter::{order};Compare that with:
#![feature(iter_order)] use std::iter::order; fn main() {}
Output:
foo.rs:2:5: 2:21 warning: unused import, #[warn(unused_imports)] on by default foo.rs:2 use std::iter::order; ^~~~~~~~~~~~~~~~ foo.rs:2:5: 2:21 warning: use of deprecated item: use the equivalent methods on `Iterator` instead, #[warn(deprecated)] on by default foo.rs:2 use std::iter::order; ^~~~~~~~~~~~~~~~I'd like to try looking at this, if that's okay.
@terrynsun Go for it!
@terrynsun How's this going?
Sorry! I was struggling with the structure of the AST walking and couldn't figure it out.
- addedP-mediumMedium priorityMedium priorityP-highHigh priorityHigh priorityand removedP-mediumMedium priorityMedium priority
on Sep 16, 2015 triage: P-high
- added 2 commits that reference this issue
on Sep 18, 2015 - added a commit that references this issue
on Sep 18, 2015 - added a commit that references this issue
on Sep 18, 2015 - ghost added a commit that references this issue
on Sep 18, 2015 - added a commit that references this issue
on Sep 22, 2015
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-highHigh priorityHigh priorityT-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
This compiles on stable:
use std::thread::{catch_panic};but this does not:
Fortunately, I can't find a way to actually use the import anyway, but it's a stability trap.