about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2019-12-22Rollup merge of #67480 - rossmacarthur:fix-41260-avoid-issue-0-part-2, r=CentrilMazdak Farrokhzad-3/+3
Require issue = "none" over issue = "0" in unstable attributes These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler. Notes: - #66299 is now in beta so `issue = "none"` is accepted. - The `tidy` tool now fails on `issue = "0"`. - Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used. - The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated. Resolves #41260 r? @varkor
2019-12-21Rollup merge of #67355 - Centril:merge-mut, r=oli-obkMazdak Farrokhzad-17/+17
Merge `ast::Mutability` and `mir::Mutability` r? @oli-obk
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-3/+3
2019-12-20introduce 'type AttrVec'Mazdak Farrokhzad-14/+14
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-17/+17
2. mir::Mutability -> ast::Mutability.
2019-12-20Rollup merge of #67131 - Centril:item-merge, r=petrochenkovMazdak Farrokhzad-297/+146
Merge `TraitItem` & `ImplItem into `AssocItem` In this PR we: - Merge `{Trait,Impl}Item{Kind?}` into `AssocItem{Kind?}` as discussed in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286. - This is done by using the cover grammar of both forms. - In particular, it requires that we syntactically allow (under `#[cfg(FALSE)]`): - `default`ness on `trait` items, - `impl` items without a body / definition (`const`, `type`, and `fn`), - and associated `type`s in `impl`s with bounds, e.g., `type Foo: Ord;`. - The syntactic restrictions are replaced by semantic ones in `ast_validation`. - Move syntactic restrictions around C-variadic parameters from the parser into `ast_validation`: - `fn`s in all contexts now syntactically allow `...`, - `...` can occur anywhere in the list syntactically (`fn foo(..., x: usize) {}`), - and `...` can be the sole parameter (`fn foo(...) {}`. r? @petrochenkov
2019-12-20Rollup merge of #64588 - matthewjasper:mir-address-of, r=oli-obkMazdak Farrokhzad-4/+4
Add a raw "address of" operator * Parse and feature gate `&raw [const | mut] expr` (feature gate name is `raw_address_of`) * Add `mir::Rvalue::AddressOf` * Use the new `Rvalue` for: * the new syntax * reference to pointer casts * drop shims for slices and arrays * Stop using `mir::Rvalue::Cast` with a reference as the operand * Correctly evaluate `mir::Rvalue::{Ref, AddressOf}` in constant propagation cc @Centril @RalfJung @oli-obk @eddyb cc #64490
2019-12-18Fix comment orderingMatthew Jasper-4/+4
2019-12-17Remove outdated references to @T from commentsMatthew Healy-7/+2
2019-12-14Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, ↵bors-0/+18
r=centril Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-0/+18
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-62/+63
functions with a `const` modifier
2019-12-12`AssocImplKind::{Method -> Fn}`.Mazdak Farrokhzad-8/+7
2019-12-12Remove `ast::{Impl,Trait}{Item,ItemKind}`.Mazdak Farrokhzad-15/+9
2019-12-12Unify assoc item visitors more.Mazdak Farrokhzad-25/+26
2019-12-12Unify associated item visitor.Mazdak Farrokhzad-47/+19
2019-12-12Unify associated item mut visitors.Mazdak Farrokhzad-43/+11
2019-12-12Unify associated item pretty printing.Mazdak Farrokhzad-75/+21
2019-12-12parse: refactor fun ret ty & param tyMazdak Farrokhzad-61/+28
2019-12-12Unify associated function parsing.Mazdak Farrokhzad-0/+1
2019-12-12Unify `{Impl,Trait}Item` as `AssocItem`.Mazdak Farrokhzad-18/+25
2019-12-12Unify `{Trait,Impl}ItemKind::TyAlias` structures.Mazdak Farrokhzad-18/+22
2019-12-12`TraitItemKind::Type` -> `TraitItemKind::TyAlias`.Mazdak Farrokhzad-5/+5
2019-12-12Use `Option` in `ImplItemKind::Method`.Mazdak Farrokhzad-21/+21
2019-12-12Use `Option` in `ImplItemKind::Const`.Mazdak Farrokhzad-5/+5
2019-12-12Alias `TraitItem` & `ImplItem`.Mazdak Farrokhzad-18/+8
Allow defaultness on trait items syntactically.
2019-12-09Rollup merge of #67113 - Centril:enum-vis-pretty-fix, r=davidtwcoTyler Mandry-0/+1
Print the visibility in `print_variant`. r? @davidtwco cc @dtolnay for `syn` awareness.
2019-12-07Make `ForeignItem` an alias of `Item`.Mazdak Farrokhzad-13/+4
2019-12-07Print the visibility in `print_variant`.Mazdak Farrokhzad-0/+1
2019-12-06Rename to `then_some` and `then`varkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-2/+3
2019-12-03Deduplicate CrateConfigMark Rousskov-4/+1
2019-12-03Move ParseSess to librustc_sessionMark Rousskov-173/+1
2019-12-03Move BufferedEarlyLint to librustc_sessionMark Rousskov-58/+2
2019-12-03Move early lint declarations to librustc_sessionMark Rousskov-9/+27
2019-12-02Address review commentsVadim Petrochenkov-9/+13
2019-12-02syntax: Optimize conversion `AttrItem` -> `MetaItem` by avoiding `outer_tokens`.Vadim Petrochenkov-29/+44
2019-12-02syntax: Use `ast::MacArgs` for macro definitionsVadim Petrochenkov-11/+5
2019-12-02syntax: Use `ast::MacArgs` for attributesVadim Petrochenkov-34/+59
2019-12-02syntax: Remove redundant span from `ast::Mac`Vadim Petrochenkov-11/+25
Also remove a couple of redundant `visit_mac` asserts
2019-12-02syntax: Introduce a struct `MacArgs` for macro argumentsVadim Petrochenkov-31/+102
2019-11-30Rollup merge of #66895 - Centril:rustc_feature, r=oli-obkMazdak Farrokhzad-1758/+49
Feature gating *declarations* => new crate `rustc_feature` This PR moves the data-oriented parts of feature gating into its own crate, `rustc_feature`. The parts consist of some data types as well as `accepted`, `active`, `removed`, and `builtin_attrs`. Feature gate checking itself remains in `syntax::feature_gate::check`. The parts which define how to emit feature gate errors could probably be moved to `rustc_errors` or to the new `rustc_session` crate introduced in #66878. The visitor itself could probably be moved as a pass in `rustc_passes` depending on how the dependency edges work out. The PR also contains some drive-by cleanup of feature gate checking. As such, the PR probably best read commit-by-commit. r? @oli-obk cc @petrochenkov cc @Mark-Simulacrum
2019-11-30derive(Default) for FeaturesMazdak Farrokhzad-1/+1
2019-11-30move GateIssue to rustc_feature & simplify emit_feature_errMazdak Farrokhzad-49/+14
2019-11-30check.rs: inline a constantMazdak Farrokhzad-4/+4
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-41/+5
2019-11-30inline two explanation constantsMazdak Farrokhzad-7/+0
2019-11-30builtin_attrs.rs -> rustc_featureMazdak Farrokhzad-607/+4
2019-11-30move is_builtin_attr to syntax::attrMazdak Farrokhzad-10/+9
2019-11-30builtin_attrs: inline some stringsMazdak Farrokhzad-8/+5