summary refs log tree commit diff
path: root/compiler/rustc_ast_passes/src
AgeCommit message (Collapse)AuthorLines
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
2022-02-02Add more *-unwind ABI variantsAmanieu d'Antras-0/+48
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"
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2022-01-18Formally implement let chainsCaio-5/+1
2022-01-17Add term to ExistentialProjectionkadmin-0/+1
Also prevent ICE when adding a const in associated const equality.
2022-01-17Add termkadmin-2/+1
Instead of having a separate enum variant for types and consts have one but have either a const or type.
2022-01-17add eq constraints on associated constantskadmin-13/+14
2022-01-12Remove deprecated LLVM-style inline assemblyTomasz Miąsko-9/+0
2022-01-01Move `PatKind::Lit` checking from ast_validation to ast loweringAaron Hill-47/+0
Fixes #92074 This allows us to insert an `ExprKind::Err` when an invalid expression is used in a literal pattern, preventing later stages of compilation from seeing an unexpected literal pattern.