Commit Graph

84 Commits

Author SHA1 Message Date
Deadbeef
fc01b4b63c fix and bless ui tests 1/2 2023-04-06 04:55:58 +00:00
Pietro Albini
bf66ddbf24
fix wrong ignore condition 2023-04-03 10:23:13 +02:00
est31
97fb15d950 Don't emit the OS error in a note
This makes it possible to make the normalization of the error message
more precise, allowing us to not normalize all notes away.
2023-03-31 03:49:21 +02:00
bors
82bfda848e Auto merge of #109224 - oli-obk:smir, r=pnkfelix
Stable MIR: Add basic MIR body datastructures

At this point it will panic on most useful MIR, but you can do basic assignments

r? `@pnkfelix`
2023-03-30 02:59:25 +00:00
clubby789
979c265a5d Check for escape sequences in Fluent resources 2023-03-29 18:34:29 +01:00
Vadim Petrochenkov
67a2c5bec8 rustc: Remove unused Session argument from some attribute functions 2023-03-22 13:55:55 +04:00
Oli Scherer
480e042097 Add Debug and Clone derives for stable mir datastructures 2023-03-16 16:17:25 +00:00
Oli Scherer
942cac1b8d Implement a minimal subset of MIR statements and terminators for smir 2023-03-16 16:06:12 +00:00
clubby789
dd7df04e16 Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
Matthias Krüger
9b6b7a3e84
Rollup merge of #108846 - celinval:smir-poc, r=oli-obk
StableMIR: Proof-of-concept implementation + test

This PR is part of the [project Stable MIR](https://github.com/rust-lang/project-stable-mir). The PR deletes old re-exports from rustc_smir and introduces a proof-of-concept implementation for APIs to retrieve crate information.

The implementation follows the [design described here](https://hackmd.io/XhnYHKKuR6-LChhobvlT-g?view), but instead of using separate crates for the implementation, it uses separate modules inside `rustc_smir`.

The API introduced at this point should be seen just as an example on how we are planning to structure the communication between tools and the compiler.

I have not explored yet what should be the right granularity, the best starting point for users, neither the best way to implement it.

r? ``````@oli-obk``````
2023-03-08 21:24:50 +01:00
Celina G. Val
5eaeb71b9f Change item collection to be on demand 2023-03-07 12:47:25 -08:00
Celina G. Val
b66db7e4e0 Create new rustc_smir struct to map future crates
+ Add some information to the README.md
2023-03-06 21:57:46 -08:00
clubby789
ef434f04e9 Allow using bool for optional diagnostics 2023-02-27 12:54:11 +00:00
bors
26c98689f2 Auto merge of #108233 - ChrisDenton:move-std-tests, r=thomcc
Move some std tests from `tests/ui-fulldeps` into `library/std`

This allows them to be tested normally along with other `./x test std` tests. Moving `rename_directory` is simple enough but `create_dir_all_bare` needed to be an std integration test.

Additionally, some tests that I couldn't move atm have instead been placed in an `std` subdirectory. These tests include ones that do fun things with processes or that intentionally abort the test process.

r? libs
2023-02-25 10:26:57 +00:00
David Wood
26255186e2 various: translation resources from cg backend
Extend `CodegenBackend` trait with a function returning the translation
resources from the codegen backend, which can be added to the complete
list of resources provided to the emitter.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-22 09:15:54 +00:00
David Wood
d1fcf61117 errors: generate typed identifiers in each crate
Instead of loading the Fluent resources for every crate in
`rustc_error_messages`, each crate generates typed identifiers for its
own diagnostics and creates a static which are pulled together in the
`rustc_driver` crate and provided to the diagnostic emitter.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-22 09:15:53 +00:00
Chris Denton
9b18b4440a
Make create_dir_all_bare an std integration test
Moving `create_dir_all` out of `ui-fulldeps` is complicated by the fact it sets the current directory. This means it can't be a unit test. Instead, move it to its own integration test.
2023-02-21 18:33:19 +00:00
Chris Denton
f7a132f428
Move rename_directory from ui-fulldeps to std
std has had a `TempDir` implementation for a long time now.
2023-02-21 18:33:19 +00:00
Chris Denton
6a92395197
Move std tests/ui-fulldeps into a std subdirectory 2023-02-21 18:33:18 +00:00
Nicholas Nethercote
9c7570b429 Fix a test. 2023-02-21 11:53:20 +11:00
Nicholas Nethercote
4143b101f9 Use ThinVec in various AST types.
This commit changes the sequence parsers to produce `ThinVec`, which
triggers numerous conversions.
2023-02-21 11:51:56 +11:00
Xiretza
f2acbb9d1e Forbid #[suggestion_*(...)] on Vecs
It is ambiguous whether this should produce several `.span_suggestions()`
calls or one `.multipart_suggestions()` call.
2023-02-01 21:49:45 +01:00
bors
d6f0642827 Auto merge of #107206 - cjgillot:no-h2l-map, r=WaffleLapkin
Remove HirId -> LocalDefId map from HIR.

Having this map in HIR prevents the creating of new definitions after HIR has been built.
Thankfully, we do not need it.

Based on https://github.com/rust-lang/rust/pull/103902
2023-01-28 16:11:33 +00:00
Matthias Krüger
53ccee0d38
Rollup merge of #107096 - clubby789:fluent-bad-messageref, r=compiler-errors
Detect references to non-existant messages in Fluent resources

Should help with cases like #107091, where `{variable}` (a message reference) is accidentally typed, rather than `{$variable}` (a variable reference)

Fixes #107370

```@rustbot``` label +A-translation
2023-01-28 11:11:07 +01:00
Camille GILLOT
1aab86eae2 Adapt ui-fulldeps. 2023-01-28 09:55:27 +00:00
Camille GILLOT
c51fc382bd Bless ui-fulldeps. 2023-01-27 20:10:25 +00:00
clubby789
ed707a106c Detect references to non-existant messages in Fluent resources 2023-01-27 11:27:22 +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
Tim Neumann
cd1d0bc20c ui tests: Remap test base directory by default. 2023-01-16 18:33:25 +00:00
Esteban Küber
e4f61afa77 Fix fulldeps-ui tests 2023-01-15 19:57:32 +00:00
bors
279f1c9d8c Auto merge of #106004 - fee1-dead-contrib:const-closures, r=oli-obk
Const closures

cc https://github.com/rust-lang/rust/issues/106003
2023-01-13 05:04:48 +00:00
Deadbeef
ca1eb4309e test use in libcore 2023-01-12 02:28:38 +00:00
mejrs
7aff210ead
Support eager subdiagnostics again 2023-01-11 14:20:34 -08:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00