Skip to content

Commit 540e12f

Browse files
Add regression test
1 parent 5497317 commit 540e12f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
1_u32.MAX();
3+
//~^ ERROR no method named `MAX` found for type `u32` in the current scope
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0599]: no method named `MAX` found for type `u32` in the current scope
2+
--> $DIR/dont-suggest-ufcs-for-const.rs:2:11
3+
|
4+
LL | 1_u32.MAX();
5+
| ------^^^--
6+
| | |
7+
| | this is an associated function, not a method
8+
| help: use associated function syntax instead: `u32::MAX()`
9+
|
10+
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
11+
= note: the candidate is defined in an impl for the type `u32`
12+
13+
error: aborting due to previous error
14+
15+
For more information about this error, try `rustc --explain E0599`.

0 commit comments

Comments
 (0)