about summary refs log tree commit diff
path: root/compiler/rustc_ast_passes/src
AgeCommit message (Collapse)AuthorLines
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.
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
2021-11-07more clippy fixesMatthias Krüger-9/+7
2021-11-07ast: Fix naming conventions in AST structuresVadim Petrochenkov-33/+25
TraitKind -> Trait TyAliasKind -> TyAlias ImplKind -> Impl FnKind -> Fn All `*Kind`s in AST are supposed to be enums. Tuple structs are converted to braced structs for the types above, and fields are reordered in syntactic order. Also, mutable AST visitor now correctly visit spans in defaultness, unsafety, impl polarity and constness.
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0
2021-10-24Rollup merge of #89558 - lcnr:query-stable-lint, r=estebankMatthias Krüger-0/+1
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
2021-10-17Some "parenthesis" and "parentheses" fixesr00ster91-1/+1
2021-10-15allow `potential_query_instability` everywherelcnr-0/+1
2021-10-14Revert "Stabilize `arbitrary_enum_discriminant`"Mark Rousskov-2/+62
This reverts commit 7a62f29f3171767090949778ce0f161e930706b9.
2021-10-05Allow adding a set of cfg's to hide from being implicitly doc(cfg)'dWim Looman-0/+1
By adding #![doc(cfg_hide(foobar))] to the crate attributes the cfg #[cfg(foobar)] (and _only_ that _exact_ cfg) will not be implicitly treated as a doc(cfg) to render a message in the documentation.
2021-10-04Rollup merge of #89494 - FabianWolff:issue-84075, r=davidtwcoJubilee-13/+36
Deny `where` clauses on `auto` traits Fixes #84075.
2021-10-03Deny `where` clauses on `auto` traitsFabian Wolff-13/+36
2021-10-03Practice diagnostic message conventionHirochika Matsumoto-1/+1
2021-09-16delay error for enabling unstable lib featuresVishad Goyal-0/+6
If #![feature] is used outside the nightly channel for only lib features, the check will be delayed to the stability pass after parsing. This is done so that appropriate help messages can be shown if the #![feature] has been used needlessly
2021-09-15Rollup merge of #88775 - pnkfelix:revert-anon-union-parsing, r=davidtwcoManish Goregaokar-69/+0
Revert anon union parsing Revert PR #84571 and #85515, which implemented anonymous union parsing in a manner that broke the context-sensitivity for the `union` keyword and thus broke stable Rust code. Fix #88583.
2021-09-15Auto merge of #88558 - fee1-dead:const-drop, r=oli-obkbors-1/+3
Const drop The changes are pretty primitive at this point. But at least it works. ^-^ Problems with the current change that I can think of now: - [x] `~const Drop` shouldn't change anything in the non-const world. - [x] types that do not have drop glues shouldn't fail to satisfy `~const Drop` in const contexts. `struct S { a: u8, b: u16 }` This might not fail for `needs_non_const_drop`, but it will fail in `rustc_trait_selection`. - [x] The current change accepts types that have `const Drop` impls but have non-const `Drop` glue. Fixes #88424. Significant Changes: - `~const Drop` is no longer treated as a normal trait bound. In non-const contexts, this bound has no effect, but in const contexts, this restricts the input type and all of its transitive fields to either a) have a `const Drop` impl or b) can be trivially dropped (i.e. no drop glue) - `T: ~const Drop` will not be linted like `T: Drop`. - Instead of recursing and iterating through the type in `rustc_mir::transform::check_consts`, we use the trait system to special case `~const Drop`. See [`rustc_trait_selection::...::candidate_assembly#assemble_const_drop_candidates`](https://github.com/fee1-dead/rust/blob/const-drop/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs#L817) and others. Changes not related to `const Drop`ping and/or changes that are insignificant: - `Node.constness_for_typeck` no longer returns `hir::Constness::Const` for type aliases in traits. This was previously used to hack how we determine default bound constness for items. But because we now use an explicit opt-in, it is no longer needed. - Removed `is_const_impl_raw` query. We have `impl_constness`, and the only existing use of that query uses `HirId`, which means we can just operate it with hir. - `ty::Destructor` now has a field `constness`, which represents the constness of the destructor. r? `@oli-obk`
2021-09-11Rollup merge of #88733 - Noble-Mushtak:88577, r=estebankJubilee-0/+14
Fix ICE for functions with more than 65535 arguments This pull request fixes #88577 by changing the `param_idx` field in the `Param` variant of `WellFormedLoc` from `u16` to `u32`, thus allowing for more than 65,535 arguments in a function. Note that I also added a regression test, but needed to add `// ignore-tidy-filelength` because the test is more than 8000 lines long.
2021-09-09Revert "Implement Anonymous{Struct, Union} in the AST"Felix S. Klock II-1/+0
This reverts commit 059b68dd677808e14e560802d235ad40beeba71e. Note that this was manually adjusted to retain some of the refactoring introduced by commit 059b68dd677808e14e560802d235ad40beeba71e, so that it could likewise retain the correction introduced in commit 5b4bc05fa57be19bb5962f4b7c0f165e194e3151
2021-09-09Manually crafted revert of d4ad050ce5778a09566f6f9ec172565815d54604 .Felix S. Klock II-68/+0
2021-09-09Allow ~const bounds on inherent implsDeadbeef-1/+3
2021-09-08Fatal error for functions with more than 65535 argumentsNoble-Mushtak-0/+14
2021-09-08Bump stage0 compiler to 1.56Mark Rousskov-1/+0
2021-09-02Auto merge of #87114 - cjgillot:abilint, r=estebankbors-2/+41
Lint missing Abi in ast validation instead of lowering.
2021-08-31Lint Abi in ast validation.Camille GILLOT-2/+41
2021-08-31Rollup merge of #88418 - fee1-dead:trait-assoc-tilde-const, r=oli-obkMara Bos-2/+2
Allow `~const` bounds on trait assoc functions r? `@oli-obk`
2021-08-30allow unordered const/ty params if any cg feature is activelcnr-1/+1
2021-08-30`feature(const_generics)` -> `feature(const_param_types)`lcnr-1/+0
2021-08-28Allow `~const` bounds on trait assoc functionsDeadbeef-2/+2
2021-08-27Fix visiting twiceDeadbeef-15/+6