- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specifically
Description
Methods on Vec are not available even if Vec is in the prelude;
let v: Vec<i32> = Vec::new();
Vec::len(&v);  // (a) -> error: unresolved name `Vec::len`
std::vec::Vec::len(&v);  // (b) -> OK!fix: use std::vec::Vec; and both lines (a) and (b) compile!
BitvSet is just weird and doesn't ever cooperate:
use std::collections::BitvSet;
let bs = BitvSet::new();
BitvSet::len(&bs); // error: unresolved name `BitvSet::len`use was fine with Vec -- but not this time.
And this is weirder:
extern crate collections;
use std::collections::BitvSet;
fn main() {
    let bs = BitvSet::new();
    BitvSet::len(&bs); // error: unresolved name `BitvSet::len`
    std::collections::BitvSet::len(&bs); // error: unresolved name `std::collections::BitvSet::len`
    collections::bitv_set::BitvSet::len(&bs); // error: unresolved name `collections::bitv_set::BitvSet::len`
    collections::bit::BitvSet::len(&bs);  // error: function `len` is private
}UFCS tracking issue: #16293
Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specifically