Commit Graph

23 Commits

Author SHA1 Message Date
Vadim Petrochenkov 7959aa42d9 expand: Pass ast::Crate by reference to AST transforming passes
Also some more attributes are passed by reference.
2023-03-23 14:20:55 +04:00
est31 a82d31d2da Simplify message paths
This makes it easier to open the messages file while developing on features.

The commit was the result of automatted changes:

for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done

for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-03-11 22:51:57 +01:00
David Wood 197a027ef0 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
Nilstrieb 031d573016 Migrate all diagnostics 2022-10-23 10:09:44 +02:00
reez12g 9a081613d7 Remove from compiler/ crates 2022-09-29 16:49:04 +09:00
Jhonny Bill Mena af99621a20 UPDATE - rename DiagnosticHandler macro to Diagnostic 2022-09-21 11:39:53 -04:00
Jhonny Bill Mena b371d94b0c UPDATE - rename DiagnosticHandler trait to IntoDiagnostic 2022-09-21 11:39:52 -04:00
Peter Medus c4009b69f6 Migrate rustc_plugin_impl to SessionDiagnostic 2022-08-22 16:35:05 +01:00
klensy fddd6888c4 remove currently unused deps 2022-06-13 22:20:51 +03:00
Jack Huey 82a42a8c73 Fully stabilize NLL 2022-06-03 17:16:41 -04:00
Andy Russell eba7b2e50e replace dynamic library module with libloading 2021-12-06 12:03:47 -05:00
Camille GILLOT 5997ba0be5 Move rustc_middle::middle::cstore to rustc_session. 2021-10-03 16:08:51 +02:00
Mark Rousskov f5a19f35c1 Migrate to 2021 2021-09-20 22:21:42 -04:00
Aaron Hill dce938053a Remove Session.used_attrs and move logic to CheckAttrVisitor
Instead of updating global state to mark attributes as used,
we now explicitly emit a warning when an attribute is used in
an unsupported position. As a side effect, we are to emit more
detailed warning messages (instead of just a generic "unused" message).

`Session.check_name` is removed, since its only purpose was to mark
the attribute as used. All of the callers are modified to use
`Attribute.has_name`

Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed
used' attribute is implemented by simply not performing any checks
in `CheckAttrVisitor` for a particular attribute.

We no longer emit unused attribute warnings for the `#[rustc_dummy]`
attribute - it's an internal attribute used for tests, so it doesn't
mark sense to treat it as 'unused'.

With this commit, a large source of global untracked state is removed.
2021-08-21 13:27:27 -05:00
bjorn3 0a32ef8096 Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
Jade c72215df19 rfc3052: Remove authors field from Cargo manifests
Since RFC 3052 soft deprecated the authors field anyway, hiding it from
crates.io, docs.rs, and making Cargo not add it by default, and it is
not generally up to date/useful information, we should remove it from
crates in this repo.
2021-07-29 14:56:05 -07:00
Camille GILLOT e297df62c3 Use () for plugin_registrar_fn. 2021-05-12 13:58:43 +02:00
Camille GILLOT bb0668138f Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
Camille GILLOT 09aadf2734 Only store a LocalDefId in hir::Item.
Items are guaranteed to be HIR owner.
2021-02-15 19:32:10 +01:00
Camille GILLOT 3e6d2967e5 Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
Erik Hofmayer de60043a75 /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
Erik Hofmayer 6785e43937 Updated html_root_url for compiler crates 2020-09-23 21:14:43 +02:00
mark c11a3894e6 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00