File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
src/test/ui/mismatched_types Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ fn zar(&foo: &Foo) {
2828fn agh ( & & bar: & u32 ) {
2929}
3030
31+ fn bgh ( & & bar: u32 ) {
32+ }
33+
3134fn ugh ( & [ bar] : & u32 ) {
3235}
3336
Original file line number Diff line number Diff line change @@ -17,11 +17,20 @@ error[E0308]: mismatched types
1717 = note: expected type `u32`
1818 = note: found type `&_`
1919
20+ error[E0308]: mismatched types
21+ --> $DIR/issue-38371.rs:31:8
22+ |
23+ 31 | fn bgh(&&bar: u32) {
24+ | ^^^^^ expected u32, found reference
25+ |
26+ = note: expected type `u32`
27+ = note: found type `&_`
28+
2029error[E0529]: expected an array or slice, found `u32`
21- --> $DIR/issue-38371.rs:31 :9
30+ --> $DIR/issue-38371.rs:34 :9
2231 |
23- 31 | fn ugh(&[bar]: &u32) {
32+ 34 | fn ugh(&[bar]: &u32) {
2433 | ^^^^^ pattern cannot match with input type `u32`
2534
26- error: aborting due to 3 previous errors
35+ error: aborting due to 4 previous errors
2736
You can’t perform that action at this time.
0 commit comments