about summary refs log tree commit diff
path: root/compiler/rustc_ast_passes
AgeCommit message (Collapse)AuthorLines
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-06Rollup merge of #94617 - pierwill:update-itertools, r=Mark-SimulacrumMatthias Krüger-1/+1
Update `itertools` Update to 0.10.1
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-04Update `itertools`pierwill-1/+1
Update to 0.10.1
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-21Auto merge of #92896 - lqd:update-deps, r=Mark-Simulacrumbors-1/+1
Update some rustc dependencies to deduplicate them This PR updates `rand` and `itertools` in rustc (not the whole workspace) in order to deduplicate them (and hopefully slightly improve compile times). ~~Currently, `object` is still duplicated, but https://github.com/rust-lang/thorin/pull/15 and updating `thorin` in the future will remove the use of version 0.27.~~ Update: Thorin 0.2 has now been released, and this PR updates `rustc_codegen_ssa` to use it and deduplicate the `object` crate. There's a final tiny rustc dependency, `cfg-if`, which will be left: as both versions 0.1.x and 1.0 looked to be heavily depended on, they will require a few cascading updates to be removed.
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-14Update itertools to deduplicate itRémy Rakic-1/+1
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.
2021-12-19Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obkbors-3/+2
Remove `SymbolStr` This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544. As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences. Best reviewed one commit at a time. r? `@oli-obk`
2021-12-15Remove unnecessary sigils around `Ident::as_str()` calls.Nicholas Nethercote-2/+1
2021-12-15Remove unnecessary sigils around `Symbol::as_str()` calls.Nicholas Nethercote-1/+1
2021-12-14Stabilize `destructuring_assignment`Jacob Pratt-5/+0
2021-12-12Auto merge of #90207 - BoxyUwU:stabilise_cg_defaults, r=lcnrbors-29/+3
Stabilise `feature(const_generics_defaults)` `feature(const_generics_defaults)` is complete implementation wise and has a pretty extensive test suite so I think is ready for stabilisation. needs stabilisation report and maybe an RFC :sweat_smile: r? `@lcnr` cc `@rust-lang/project-const-generics`
2021-12-10remove feature gate and cleanup codeEllen-29/+3
2021-12-09Remove redundant [..]sest31-3/+3
2021-11-27Rollup merge of #91208 - estebank:eq-constraint, r=cjgillotMatthias Krüger-1/+49
Account for incorrect `where T::Assoc = Ty` bound Provide suggestoin to constrain trait bound for associated type. Revert incorrect changes to `missing-bounds` test. Address part of #20041.
2021-11-25Account for incorrect `where T::Assoc = Ty` boundEsteban Kuber-1/+49
Provide suggestoin to constrain trait bound for associated type. Revert incorrect changes to `missing-bounds` test. Address part of #20041.
2021-11-24Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelidGuillaume Gomez-1/+5
Create rustdoc_internals feature gate As suggested by ``@camelid`` [here](https://github.com/rust-lang/rust/pull/90398#issuecomment-955093851), since `doc_keyword` and `doc_primitive` aren't meant to be stabilized, we could put them behind a same feature flag. This is pretty much what it would look like (needs to update the tests too). The tracking issue is https://github.com/rust-lang/rust/issues/90418. What do you think ``@rust-lang/rustdoc`` ?
2021-11-24Update error message for doc(keyword)Guillaume Gomez-1/+1
2021-11-24Create rustdoc_internals feature gateGuillaume Gomez-1/+5
2021-11-22Split inline const to two feature gatesGary Guo-0/+1
2021-11-12rustc_feature: Convert `BuiltinAttribute` from tuple to a structVadim Petrochenkov-5/+8
2021-11-07Auto merge of #90668 - matthiaskrgr:clippy_nov7, r=jyn514bors-9/+7
more clippy fixes