|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/issue-54505-no-literals.rs:16:16 |
| 3 | + | |
| 4 | +LL | take_range(std::ops::Range { start: 0, end: 1 }); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | | |
| 7 | + | expected reference, found struct `std::ops::Range` |
| 8 | + | help: consider borrowing here: `&std::ops::Range { start: 0, end: 1 }` |
| 9 | + | |
| 10 | + = note: expected type `&_` |
| 11 | + found type `std::ops::Range<{integer}>` |
| 12 | + |
| 13 | +error[E0308]: mismatched types |
| 14 | + --> $DIR/issue-54505-no-literals.rs:21:16 |
| 15 | + | |
| 16 | +LL | take_range(::std::ops::Range { start: 0, end: 1 }); |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 18 | + | | |
| 19 | + | expected reference, found struct `std::ops::Range` |
| 20 | + | help: consider borrowing here: `&::std::ops::Range { start: 0, end: 1 }` |
| 21 | + | |
| 22 | + = note: expected type `&_` |
| 23 | + found type `std::ops::Range<{integer}>` |
| 24 | + |
| 25 | +error[E0308]: mismatched types |
| 26 | + --> $DIR/issue-54505-no-literals.rs:26:16 |
| 27 | + | |
| 28 | +LL | take_range(std::ops::RangeFrom { start: 1 }); |
| 29 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 30 | + | | |
| 31 | + | expected reference, found struct `std::ops::RangeFrom` |
| 32 | + | help: consider borrowing here: `&std::ops::RangeFrom { start: 1 }` |
| 33 | + | |
| 34 | + = note: expected type `&_` |
| 35 | + found type `std::ops::RangeFrom<{integer}>` |
| 36 | + |
| 37 | +error[E0308]: mismatched types |
| 38 | + --> $DIR/issue-54505-no-literals.rs:31:16 |
| 39 | + | |
| 40 | +LL | take_range(::std::ops::RangeFrom { start: 1 }); |
| 41 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 42 | + | | |
| 43 | + | expected reference, found struct `std::ops::RangeFrom` |
| 44 | + | help: consider borrowing here: `&::std::ops::RangeFrom { start: 1 }` |
| 45 | + | |
| 46 | + = note: expected type `&_` |
| 47 | + found type `std::ops::RangeFrom<{integer}>` |
| 48 | + |
| 49 | +error[E0308]: mismatched types |
| 50 | + --> $DIR/issue-54505-no-literals.rs:36:16 |
| 51 | + | |
| 52 | +LL | take_range(std::ops::RangeFull {}); |
| 53 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 54 | + | | |
| 55 | + | expected reference, found struct `std::ops::RangeFull` |
| 56 | + | help: consider borrowing here: `&std::ops::RangeFull {}` |
| 57 | + | |
| 58 | + = note: expected type `&_` |
| 59 | + found type `std::ops::RangeFull` |
| 60 | + |
| 61 | +error[E0308]: mismatched types |
| 62 | + --> $DIR/issue-54505-no-literals.rs:41:16 |
| 63 | + | |
| 64 | +LL | take_range(::std::ops::RangeFull {}); |
| 65 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 66 | + | | |
| 67 | + | expected reference, found struct `std::ops::RangeFull` |
| 68 | + | help: consider borrowing here: `&::std::ops::RangeFull {}` |
| 69 | + | |
| 70 | + = note: expected type `&_` |
| 71 | + found type `std::ops::RangeFull` |
| 72 | + |
| 73 | +error[E0308]: mismatched types |
| 74 | + --> $DIR/issue-54505-no-literals.rs:46:16 |
| 75 | + | |
| 76 | +LL | take_range(std::ops::RangeInclusive::new(0, 1)); |
| 77 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 78 | + | | |
| 79 | + | expected reference, found struct `std::ops::RangeInclusive` |
| 80 | + | help: consider borrowing here: `&std::ops::RangeInclusive::new(0, 1)` |
| 81 | + | |
| 82 | + = note: expected type `&_` |
| 83 | + found type `std::ops::RangeInclusive<{integer}>` |
| 84 | + |
| 85 | +error[E0308]: mismatched types |
| 86 | + --> $DIR/issue-54505-no-literals.rs:51:16 |
| 87 | + | |
| 88 | +LL | take_range(::std::ops::RangeInclusive::new(0, 1)); |
| 89 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 90 | + | | |
| 91 | + | expected reference, found struct `std::ops::RangeInclusive` |
| 92 | + | help: consider borrowing here: `&::std::ops::RangeInclusive::new(0, 1)` |
| 93 | + | |
| 94 | + = note: expected type `&_` |
| 95 | + found type `std::ops::RangeInclusive<{integer}>` |
| 96 | + |
| 97 | +error[E0308]: mismatched types |
| 98 | + --> $DIR/issue-54505-no-literals.rs:56:16 |
| 99 | + | |
| 100 | +LL | take_range(std::ops::RangeTo { end: 5 }); |
| 101 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 102 | + | | |
| 103 | + | expected reference, found struct `std::ops::RangeTo` |
| 104 | + | help: consider borrowing here: `&std::ops::RangeTo { end: 5 }` |
| 105 | + | |
| 106 | + = note: expected type `&_` |
| 107 | + found type `std::ops::RangeTo<{integer}>` |
| 108 | + |
| 109 | +error[E0308]: mismatched types |
| 110 | + --> $DIR/issue-54505-no-literals.rs:61:16 |
| 111 | + | |
| 112 | +LL | take_range(::std::ops::RangeTo { end: 5 }); |
| 113 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 114 | + | | |
| 115 | + | expected reference, found struct `std::ops::RangeTo` |
| 116 | + | help: consider borrowing here: `&::std::ops::RangeTo { end: 5 }` |
| 117 | + | |
| 118 | + = note: expected type `&_` |
| 119 | + found type `std::ops::RangeTo<{integer}>` |
| 120 | + |
| 121 | +error[E0308]: mismatched types |
| 122 | + --> $DIR/issue-54505-no-literals.rs:66:16 |
| 123 | + | |
| 124 | +LL | take_range(std::ops::RangeToInclusive { end: 5 }); |
| 125 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 126 | + | | |
| 127 | + | expected reference, found struct `std::ops::RangeToInclusive` |
| 128 | + | help: consider borrowing here: `&std::ops::RangeToInclusive { end: 5 }` |
| 129 | + | |
| 130 | + = note: expected type `&_` |
| 131 | + found type `std::ops::RangeToInclusive<{integer}>` |
| 132 | + |
| 133 | +error[E0308]: mismatched types |
| 134 | + --> $DIR/issue-54505-no-literals.rs:71:16 |
| 135 | + | |
| 136 | +LL | take_range(::std::ops::RangeToInclusive { end: 5 }); |
| 137 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 138 | + | | |
| 139 | + | expected reference, found struct `std::ops::RangeToInclusive` |
| 140 | + | help: consider borrowing here: `&::std::ops::RangeToInclusive { end: 5 }` |
| 141 | + | |
| 142 | + = note: expected type `&_` |
| 143 | + found type `std::ops::RangeToInclusive<{integer}>` |
| 144 | + |
| 145 | +error: aborting due to 12 previous errors |
| 146 | + |
| 147 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments