Commit Graph

76 Commits

Author SHA1 Message Date
Pietro Albini
64af509377
remove invalid ignore-pretty 2023-04-03 09:24:11 +02:00
Tom Martin
86230dcde6
Bless 2023-04-01 03:52:58 +01:00
Tom Martin
10c36445ff
Update non-derive macro error message to match suggestion
It's now split between two errors, one to remove the invalid derive macro
and one suggesting adding a new non-derive macro
2023-03-30 21:43:32 +01:00
James Dietz
ff88787ff0 check for write macro and write_fmt with err msg
added ui test
blessed stderrs
fixed typo
reblessed
2023-03-27 21:01:23 -04:00
Tom Martin
42f2be8a8c
Add suggestion to remove derive() if invoked macro is non-derive 2023-03-26 16:01:25 +01:00
bohan
1775722410 fix: modify the condition that resolve_imports stops 2023-03-19 20:18:45 +08:00
Mu42
550e3087d1 Suggest surrounding the macro with {} to interpret as a statement 2023-03-17 14:36:22 +08:00
clubby789
dd7df04e16 Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
bors
8a73f50d87 Auto merge of #109019 - matthiaskrgr:rollup-ihjntil, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #104363 (Make `unused_allocation` lint against `Box::new` too)
 - #106633 (Stabilize `nonzero_min_max`)
 - #106844 (allow negative numeric literals in `concat!`)
 - #108071 (Implement goal caching with the new solver)
 - #108542 (Force parentheses around `match` expression in binary expression)
 - #108690 (Place size limits on query keys and values)
 - #108708 (Prevent overflow through Arc::downgrade)
 - #108739 (Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time)
 - #108806 (Querify register_tools and post-expansion early lints)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-11 18:15:53 +00:00
Matthias Krüger
9c38ae5653
Rollup merge of #108542 - bwmf2:expanded, r=wesleywiser
Force parentheses around `match` expression in binary expression

This attempts to solve https://github.com/rust-lang/rust/issues/98790.
2023-03-11 15:43:13 +01:00
Matthias Krüger
d47d4ad4b2
Rollup merge of #106844 - Ezrashaw:concat-negative-int-lit, r=dtolnay
allow negative numeric literals in `concat!`

Fixes #106837

While *technically* negative numeric literals are implemented as unary operations, users can reasonably expect that negative literals are treated the same as positive literals.
2023-03-11 15:43:12 +01:00
Nilstrieb
3dee4630ba Add note when matching token with nonterminal
The current error message is _really_ confusing.
2023-03-10 16:59:26 +00:00
Matthias Krüger
13640e337a
Rollup merge of #108573 - kornelski:runtimeenvs, r=WaffleLapkin
Explain compile-time vs run-time difference in env!() error message

This PR is clarifying error message of `env!()` based on this user question: https://users.rust-lang.org/t/environment-variable-out-dir-is-undefined/90067

It makes it clear that `env!()` is for env variables defined at compile-time. There's special-case help text for common Cargo build script variables.

I've also rearranged the code to avoid allocating error message on the happy path when the env var is defined.
2023-03-02 23:05:29 +01:00
bwmf2
219195fc4c Add UI test 2023-03-02 21:58:57 +01:00
bwmf2
cdeb0e3e02 Fix UI test 2023-03-02 21:58:56 +01:00
Kornel
2407b0c578 Explain compile-time vs run-time difference in env!() error message 2023-02-28 16:44:59 +00:00
yukang
f01d0c02e7 Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
Michael Goulet
56bf28d4f4 Expand const-if-const trait bounds correctly 2023-02-07 21:00:12 +00:00
bors
3e97763872 Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk
Move format_args!() into AST (and expand it during AST lowering)

Implements https://github.com/rust-lang/compiler-team/issues/541

This moves FormatArgs from rustc_builtin_macros to rustc_ast_lowering. For now, the end result is the same. But this allows for future changes to do smarter things with format_args!(). It also allows Clippy to directly access the ast::FormatArgs, making things a lot easier.

This change turns the format args types into lang items. The builtin macro used to refer to them by their path. After this change, the path is no longer relevant, making it easier to make changes in `core`.

This updates clippy to use the new language items, but this doesn't yet make clippy use the ast::FormatArgs structure that's now available. That should be done after this is merged.
2023-01-26 12:44:47 +00:00
Matthias Krüger
9e3f330656
Rollup merge of #106897 - estebank:issue-99430, r=davidtwco
Tweak E0597

CC #99430
2023-01-25 22:19:52 +01:00
Aaron Hill
dc8876196b
Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS to future-incompat report 2023-01-21 14:38:25 -06:00
Michael Goulet
21725774a2 note -> help 2023-01-17 03:09:49 +00:00
Esteban Küber
7b8251e188 Account for method call and indexing when looking for inner-most path in expression 2023-01-17 02:52:43 +00:00
Ezra Shaw
41856b0a0f
allow negative numeric literals in concat! 2023-01-15 12:48:53 +13:00
Mara Bos
525b0bb77a Bless tests. 2023-01-12 00:25:46 +01:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00