fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0599]: no method named `a` found for struct `S` in the current scope 2 --> $DIR/trait-item-privacy.rs:67:7 3 | 4LL | struct S; 5 | --------- method `a` not found for this 6... 7LL | S.a(); 8 | ^ method not found in `S` 9 | 10 = help: items from traits can only be used if the trait is implemented and in scope 11note: `method::A` defines an item `a`, perhaps you need to implement it 12 --> $DIR/trait-item-privacy.rs:6:5 13 | 14LL | trait A { 15 | ^^^^^^^ 16 17error[E0599]: no method named `b` found for struct `S` in the current scope 18 --> $DIR/trait-item-privacy.rs:68:7 19 | 20LL | struct S; 21 | --------- method `b` not found for this 22... 23LL | fn b(&self) { } 24 | - 25 | | 26 | the method is available for `std::boxed::Box<S>` here 27 | the method is available for `std::sync::Arc<S>` here 28 | the method is available for `std::rc::Rc<S>` here 29... 30LL | S.b(); 31 | ^ method not found in `S` 32 | 33 = help: items from traits can only be used if the trait is in scope 34help: the following trait is implemented but not in scope; perhaps add a `use` for it: 35 | 36LL | use method::B; 37 | 38 39error[E0624]: associated function `a` is private 40 --> $DIR/trait-item-privacy.rs:72:7 41 | 42LL | c.a(); 43 | ^ private associated function 44 45error[E0599]: no function or associated item named `a` found for struct `S` in the current scope 46 --> $DIR/trait-item-privacy.rs:78:8 47 | 48LL | struct S; 49 | --------- function or associated item `a` not found for this 50... 51LL | S::a(&S); 52 | ^ function or associated item not found in `S` 53 | 54 = help: items from traits can only be used if the trait is implemented and in scope 55note: `method::A` defines an item `a`, perhaps you need to implement it 56 --> $DIR/trait-item-privacy.rs:6:5 57 | 58LL | trait A { 59 | ^^^^^^^ 60 61error[E0599]: no function or associated item named `b` found for struct `S` in the current scope 62 --> $DIR/trait-item-privacy.rs:80:8 63 | 64LL | struct S; 65 | --------- function or associated item `b` not found for this 66... 67LL | S::b(&S); 68 | ^ function or associated item not found in `S` 69 | 70 = help: items from traits can only be used if the trait is in scope 71help: the following trait is implemented but not in scope; perhaps add a `use` for it: 72 | 73LL | use method::B; 74 | 75 76error[E0624]: associated function `a` is private 77 --> $DIR/trait-item-privacy.rs:84:8 78 | 79LL | C::a(&S); 80 | ^ private associated function 81 82error[E0599]: no associated item named `A` found for struct `S` in the current scope 83 --> $DIR/trait-item-privacy.rs:97:8 84 | 85LL | struct S; 86 | --------- associated item `A` not found for this 87... 88LL | S::A; 89 | ^ associated item not found in `S` 90 | 91 = help: items from traits can only be used if the trait is implemented and in scope 92note: `assoc_const::A` defines an item `A`, perhaps you need to implement it 93 --> $DIR/trait-item-privacy.rs:24:5 94 | 95LL | trait A { 96 | ^^^^^^^ 97 98error[E0599]: no associated item named `B` found for struct `S` in the current scope 99 --> $DIR/trait-item-privacy.rs:98:8 100 | 101LL | struct S; 102 | --------- associated item `B` not found for this 103... 104LL | S::B; 105 | ^ associated item not found in `S` 106 | 107 = help: items from traits can only be used if the trait is in scope 108help: the following trait is implemented but not in scope; perhaps add a `use` for it: 109 | 110LL | use assoc_const::B; 111 | 112 113error[E0624]: associated constant `A` is private 114 --> $DIR/trait-item-privacy.rs:101:8 115 | 116LL | C::A; 117 | ^ private associated constant 118 119error[E0038]: the trait `assoc_const::C` cannot be made into an object 120 --> $DIR/trait-item-privacy.rs:101:5 121 | 122LL | const A: u8 = 0; 123 | - ...because it contains this associated `const` 124... 125LL | const B: u8 = 0; 126 | - ...because it contains this associated `const` 127... 128LL | pub trait C: A + B { 129 | - this trait cannot be made into an object... 130LL | const C: u8 = 0; 131 | - ...because it contains this associated `const` 132... 133LL | C::A; 134 | ^^^^ the trait `assoc_const::C` cannot be made into an object 135 | 136 = help: consider moving `C` to another trait 137 = help: consider moving `B` to another trait 138 = help: consider moving `A` to another trait 139 140error[E0223]: ambiguous associated type 141 --> $DIR/trait-item-privacy.rs:115:12 142 | 143LL | let _: S::A; 144 | ^^^^ help: use fully-qualified syntax: `<S as Trait>::A` 145 146error[E0223]: ambiguous associated type 147 --> $DIR/trait-item-privacy.rs:116:12 148 | 149LL | let _: S::B; 150 | ^^^^ help: use fully-qualified syntax: `<S as Trait>::B` 151 152error[E0223]: ambiguous associated type 153 --> $DIR/trait-item-privacy.rs:117:12 154 | 155LL | let _: S::C; 156 | ^^^^ help: use fully-qualified syntax: `<S as Trait>::C` 157 158error: associated type `A` is private 159 --> $DIR/trait-item-privacy.rs:119:12 160 | 161LL | let _: T::A; 162 | ^^^^ private associated type 163 164error: associated type `A` is private 165 --> $DIR/trait-item-privacy.rs:128:9 166 | 167LL | A = u8, 168 | ^^^^^^ private associated type 169 170error: aborting due to 15 previous errors 171 172Some errors have detailed explanations: E0038, E0223, E0599, E0624. 173For more information about an error, try `rustc --explain E0038`.