Commit Graph

21 Commits

Author SHA1 Message Date
Maybe Lapkin
46967bd2e9
Mention both release *and* edition breakage for never type lints 2024-11-14 01:32:54 +01:00
Michael Goulet
8473e3f6af Make sure that we suggest turbofishing the right type arg 2024-11-12 03:02:23 +00:00
Michael Goulet
df6f5841e5 And also suggest for qpaths 2024-11-01 01:46:23 +00:00
Michael Goulet
c930bba283 And locals too 2024-11-01 01:46:23 +00:00
Michael Goulet
ea4fb7c25c Suggest adding self type to method 2024-11-01 01:46:23 +00:00
Nicholas Nethercote
dd2b027d5d Tweak more warnings.
Much like the previous commit.

I think the removal of "the token" in each message is fine here. There
are many more error messages that mention tokens without saying "the
token" than those that do say it.
2024-10-28 14:20:28 +11:00
VulnBandit
9a2772e1c2 Don't assume traits used as type are trait objs 2024-10-11 17:36:04 +02:00
Michael Goulet
fdd90db528 Point out exactly what obligation will fail 2024-06-13 21:47:43 -04:00
Waffle Lapkin
ea98e42bfd rebase blessing 2024-06-13 14:43:16 +02:00
Maybe Waffle
0f63cd1056 Add some more tests for the never type fallback 2024-05-17 15:01:43 +02:00
Maybe Waffle
3b3e504235 Add a test for never type fallback edition change 2024-05-17 15:01:43 +02:00
Oli Scherer
958a02247a Use the more informative generic type inference failure error on method calls on raw pointers 2024-03-20 15:53:06 +00:00
Vadim Petrochenkov
9f8d05f29f macro_rules: Preserve all metavariable spans in a global side table 2024-02-18 11:19:24 +03:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
Vadim Petrochenkov
c586fe40f1 macro_rules: Add more tests for using tt in addition to ident
Generally, `tt` and `ident` should behave identically, modulo the latter accepting only a subset of token trees.
2024-01-05 19:13:52 +03:00
Matthias Krüger
f3f9b3043e
Rollup merge of #118691 - chfogelman:improve-cstr-error, r=fmease
Add check for possible CStr literals in pre-2021

Fixes [#118654](https://github.com/rust-lang/rust/issues/118654)

Adds information to errors caused by possible CStr literals in pre-2021.

The lexer separates `c"str"` into two tokens if the edition is less than 2021, which later causes an error when parsing. This error now has a more helpful message that directs them to information about editions. However, the user might also have written `c "str"` in a later edition, so to not confuse people who _are_ using a recent edition, I also added a note about whitespace.

We could probably figure out exactly which scenario has been encountered by examining spans and editions, but I figured it would be better not to overcomplicate the creation of the error too much.

This is my first code PR and I tried to follow existing conventions as much as possible, but I probably missed something, so let me know!
2023-12-20 09:46:10 +01:00
Carter Hunt Fogelman
2c96025874 Improve compiler error for c-strings in pre-2021 2023-12-19 13:28:48 -08:00
Eric Huss
f481596ee4 Remove edition umbrella features. 2023-12-10 13:03:28 -08:00
Nilstrieb
41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
asquared31415
b19466abc2 improve error message for calling a method on a raw pointer with an unknown pointee, and add some tests 2023-05-26 13:15:15 -04:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00