about summary refs log tree commit diff
path: root/compiler/rustc_ast_passes/src
AgeCommit message (Collapse)AuthorLines
2022-07-18avoid `Symbol` to `&str` conversionsTakayuki Maeda-2/+2
2022-07-18Rollup merge of #99360 - compiler-errors:issue-99331, r=fee1-deadYuki Okushi-4/+6
Do not ICE when we have `-Zunpretty=expanded` with invalid ABI Fixes #99331
2022-07-17rustdoc: extend `#[doc(tuple_variadic)]` to fn pointersMichael Howell-2/+2
The attribute is also renamed `fake_variadic`.
2022-07-16Do not ICE when we have -Zunpretty=expand with invalid ABIMichael Goulet-4/+6
2022-07-16Stabilize `let_chains`Caio-27/+16
2022-07-12Parse closure bindersMaybe Waffle-0/+9
This is first step in implementing RFC 3216. - Parse `for<'a>` before closures in ast - Error in lowering - Add `closure_lifetime_binder` feature
2022-07-06Suggest using block for `extern "abi" fn` with no bodyNixon Enraght-Moony-11/+54
2022-07-02ast: Add span to `Extern`Nixon Enraght-Moony-4/+5
2022-06-16Auto merge of #97842 - notriddle:notriddle/tuple-docs, r=jsha,GuillaumeGomezbors-0/+5
Improve the tuple and unit trait docs * Reduce duplicate impls; show only the `(T,)` and include a sentence saying that there exists ones up to twelve of them. * Show `Copy` and `Clone`. * Show auto traits like `Send` and `Sync`, and blanket impls like `Any`. Here's the new version: * <https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html> * <https://notriddle.com/notriddle-rustdoc-test/std/primitive.unit.html>
2022-06-14Remove `rustc_deprecated` diagnosticsJacob Pratt-2/+1
2022-06-13remove unnecessary `to_string` and `String::new`Takayuki Maeda-9/+9
2022-06-11Fix incorrectly spelled "variadic"Michael Howell-2/+2
2022-06-08rustdoc: show tuple impls as `impl Trait for (T, ...)`Michael Howell-0/+5
This commit adds a new unstable attribute, `#[doc(tuple_varadic)]`, that shows a 1-tuple as `(T, ...)` instead of just `(T,)`, and links to a section in the tuple primitive docs that talks about these.
2022-06-07Auto merge of #97512 - scottmcm:add-coldcc, r=nagisa,lcnrbors-0/+8
Add support for emitting functions with `coldcc` to LLVM The eventual goal is to try using this for things like the internal panicking stuff, to see whether it helps.
2022-06-04Support the `#[expect]` attribute on fn parameters (RFC-2383)xFrednet-2/+10
2022-05-30Add support for emitting functions with `coldcc` in LLVMScott McMurray-0/+8
The eventual goal is to try using this for things like the internal panicking stuff, to see whether it helps.
2022-05-26clippy::complexity fixesMatthias Krüger-5/+4
clone_on_copy useless_format bind_instead_of_map filter_map_identity useless_conversion map_flatten unnecessary_unwrap
2022-05-21Remove feature: `crate` visibility modifierJacob Pratt-13/+0
2022-05-20Introduce LifetimeCtxt.Camille GILLOT-2/+2
2022-05-15rustc: Stricter checking for #[link] attributesVadim Petrochenkov-31/+0
2022-04-30Feature-gate `do yeet` inside `cfg`s tooScott McMurray-8/+1
2022-04-30Add `do yeet` expressions to allow experimentation in nightlyScott McMurray-0/+8
Using an obviously-placeholder syntax. An RFC would still be needed before this could have any chance at stabilization, and it might be removed at any point. But I'd really like to have it in nightly at least to ensure it works well with try_trait_v2, especially as we refactor the traits.
2022-04-21rename to `BoundKind` and add commentsSparrowLii-7/+7
2022-04-20Add `BoundCtxt` in `visit_param_bounds` to check questions in boundsSparrowLii-37/+36
2022-04-17Auto merge of #95779 - cjgillot:ast-lifetimes-undeclared, r=petrochenkovbors-16/+24
Report undeclared lifetimes during late resolution. First step in https://github.com/rust-lang/rust/pull/91557 We reuse the rib design of the current resolution framework. Specific `LifetimeRib` and `LifetimeRibKind` types are introduced. The most important variant is `LifetimeRibKind::Generics`, which happens each time we encounter something which may introduce generic lifetime parameters. It can be an item or a `for<...>` binder. The `LifetimeBinderKind` specifies how this rib behaves with respect to in-band lifetimes. r? `@petrochenkov`
2022-04-17Visit generics inside visit_fn.Camille GILLOT-16/+24
2022-04-17Rollup merge of #95346 - Aaron1011:stablize-const-extern-fn, r=pnkfelixDylan DPC-17/+20
Stablize `const_extern_fn` for "Rust" and "C" All other ABIs are left unstable for now. cc #64926
2022-03-31[let_chains] Forbid let inside parenthesesCaio-12/+42
2022-03-30Stabilize native library modifier syntax and the `whole-archive` modifier ↵Vadim Petrochenkov-8/+0
specifically
2022-03-30Rollup merge of #95461 - nyurik:spelling, r=lcnrDylan DPC-1/+1
Spellchecking some comments This PR attempts to clean up some minor spelling mistakes in comments
2022-03-30Spellchecking compiler codeYuri Astrakhan-2/+2
Address some spelling mistakes in strings, private function names, and function params.
2022-03-30Spellchecking some commentsYuri Astrakhan-1/+1
This PR attempts to clean up some minor spelling mistakes in comments
2022-03-26Stablize `const_extern_fn` for "Rust" and "C"Aaron Hill-17/+20
All other ABIs are left unstable for now. cc #64926
2022-03-25Minor `let_chains` modificationCaio-1/+4
2022-03-22diagnostics: do not suggest `fn foo({ <body> }`Michael Howell-1/+8
Instead of suggesting that the body always replace the last character on the line, presuming it must be a semicolon, the parser should instead check what the last character is, and append the body if it is anything else. Fixes #83104
2022-03-16rustc_error: make ErrorReported impossible to constructmark-6/+7
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
2022-03-10Rollup merge of #94635 - jhpratt:merge-deprecated-attrs, r=davidtwcoMatthias Krüger-7/+0
Merge `#[deprecated]` and `#[rustc_deprecated]` The first commit makes "reason" an alias for "note" in `#[rustc_deprecated]`, while still prohibiting it in `#[deprecated]`. The second commit changes "suggestion" to not just be a feature of `#[rustc_deprecated]`. This is placed behind the new `deprecated_suggestion` feature. This needs a tracking issue; let me know if this PR will be approved and I can create one. The third commit is what permits `#[deprecated]` to be used when `#![feature(staged_api)]` is enabled. This isn't yet used in stdlib (only tests), as it would require duplicating all deprecation attributes until a bootstrap occurs. I intend to submit a follow-up PR that replaces all uses and removes the remaining `#[rustc_deprecated]` code after the next bootstrap. `@rustbot` label +T-libs-api +C-feature-request +A-attributes +S-waiting-on-review
2022-03-09Permit `#[deprecated]` in stdlibJacob Pratt-8/+0
2022-03-09Warn users about || in let chain expressionsCaio-41/+69
2022-03-05Review changesJack Huey-2/+6
2022-03-05Change to lintJack Huey-9/+14
2022-03-05Change syntax for TyAlias where clausesJack Huey-7/+73
2022-03-04Change `rustc_deprecated` to use `note`Jacob Pratt-0/+1
This keeps `reason` around for the time being. This is necessary to avoid breakage during the bootstrap process. This change, as a whole, brings `#[rustc_deprecated]` more in line with `#[deprecated]`.
2022-03-03Gate stability attrs with other attributes.Camille GILLOT-0/+25
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-20Rollup merge of #94146 - est31:let_else, r=cjgillotMatthias Krüger-9/+6
Adopt let else in more places Continuation of #89933, #91018, #91481, #93046, #93590, #94011. I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs #94139, #94142, #94143, #94144.
2022-02-19Adopt let else in more placesest31-9/+6
2022-02-18Rollup merge of #93634 - matthiaskrgr:clippy_complexity_jan_2022, r=oli-obkMatthias Krüger-1/+1
compiler: clippy::complexity fixes useless_format map_flatten useless_conversion needless_bool filter_next clone_on_copy needless_option_as_deref
2022-02-08Auto merge of #93561 - Amanieu:more-unwind-abi, r=nagisabors-0/+48
Add more *-unwind ABI variants The following *-unwind ABIs are now supported: - "C-unwind" - "cdecl-unwind" - "stdcall-unwind" - "fastcall-unwind" - "vectorcall-unwind" - "thiscall-unwind" - "aapcs-unwind" - "win64-unwind" - "sysv64-unwind" - "system-unwind" cc `@rust-lang/wg-ffi-unwind`
2022-02-03compiler: clippy::complexity fixesMatthias Krüger-1/+1
useless_format map_flatten useless_conversion needless_bool filter_next clone_on_copy needless_option_as_deref