about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2018-02-05Stabilize use_nested_groupsPietro Albini-26/+2
2018-02-04Rollup merge of #47947 - goodmanjonathan:stabilize_match_beginning_vert, ↵kennytm-8/+2
r=petrochenkov Stabilize feature(match_beginning_vert) With this feature stabilized, match expressions can optionally have a `|` at the beginning of each arm. Reference PR: rust-lang-nursery/reference#231 Closes #44101
2018-01-30stabilize match_beginning_vertJonathan Goodman-8/+2
2018-01-29Add internal-only rustc_serialize_exclude_null attribute for making the ↵Manish Goregaokar-0/+5
field only exist in the json if the flag is passed
2018-01-28Auto merge of #47800 - Pulkit07:issue47755, r=sfacklerbors-3/+1
don't mention tasks in stability warnings of #[thread_local] #47755 This is a fix for issue #47755.
2018-01-27don't mention tasks in stability warnings of #[thread_local] #47755Pulkit Goyal-3/+1
This is a fix for issue #47755.
2018-01-26Do not capture stderr in the compiler. Instead just panic silently for fatal ↵John Kåre Alsaker-2/+2
errors
2018-01-23Stabilized `#[repr(align(x))]` attribute (RFC 1358)Cameron Hart-13/+17
2018-01-22Auto merge of #47158 - rkruppe:repr-transparent, r=eddybbors-0/+8
Implement repr(transparent) r? @eddyb for the functional changes. The bulk of the PR is error messages and docs, might be good to have a doc person look over those. cc #43036 cc @nox
2018-01-16Implement repr(transparent)Robin Kruppe-0/+8
2018-01-15Reexport -> re-export in prose and documentation commentsCarol (Nichols || Goulding)-1/+1
2018-01-15Reexport -> re-export in error messagesCarol (Nichols || Goulding)-1/+1
2018-01-15Add error code for unstable feature errorsGuillaume Gomez-1/+3
2018-01-13Auto merge of #47416 - petrochenkov:remove-impl-for-dot-dot, r=petrochenkovbors-7/+0
Remove `impl Foo for .. {}` in favor `auto trait Foo {}` Rebase of https://github.com/rust-lang/rust/pull/46480 with restored parsing support.
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-7/+0
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2018-01-13Auto merge of #47251 - rkruppe:rm-simd-attr, r=eddybbors-10/+2
Remove deprecated unstable attribute #[simd] The `#[simd]` attribute has been deprecated since c8b6d5b23cc8b2d43ece9f06252c7e98280fb8e5 back in 2015. Any nightly crates using it have had ample time to switch to `#[repr(simd)]`, and if they didn't they're likely broken by now anyway. r? @eddyb
2018-01-13Auto merge of #46461 - zackmdavis:elemental_method_suggestion_jamboree, ↵bors-0/+7
r=estebank type error method suggestions use whitelisted identity-like conversions ![method_jamboree_summit](https://user-images.githubusercontent.com/1076988/33523646-e5c43184-d7c0-11e7-98e5-1bff426ade86.png) Previously, on a type mismatch (and if this wasn't preëmpted by a higher-priority suggestion), we would look for argumentless methods returning the expected type, and list them in a `help` note. This had two major shortcomings: firstly, a lot of the suggestions didn't really make sense (if you used a &str where a String was expected, `.to_ascii_uppercase()` is probably not the solution you were hoping for). Secondly, we weren't generating suggestions from the most useful traits! We address the first problem with an internal `#[rustc_conversion_suggestion]` attribute meant to mark methods that keep the "same value" in the relevant sense, just converting the type. We address the second problem by making `FnCtxt.probe_for_return_type` pass the `ProbeScope::AllTraits` to `probe_op`: this would seem to be safe because grep reveals no other callers of `probe_for_return_type`. Also, structured suggestions are pretty and good for RLS and friends. Unfortunately, the trait probing is still not all one would hope for: at a minimum, we don't know how to rule out `into()` in cases where it wouldn't actually work, and we don't know how to rule in `.to_owned()` where it would. Issues #46459 and #46460 have been filed and are ref'd in a FIXME. This is hoped to resolve #42929, #44672, and #45777.
2018-01-07Remove deprecated unstable attribute `#[simd]`Robin Kruppe-10/+2
The `#[simd]` attribute has been deprecated since c8b6d5b23cc8b2d43ece9f06252c7e98280fb8e5 back in 2015. Any nightly crates using it have had ample time to switch to `#[repr(simd)]`, and if they didn't they're likely broken by now anyway.
2018-01-06type error method suggestions use whitelisted identity-like conversionsZack M. Davis-0/+7
Previously, on a type mismatch (and if this wasn't preëmpted by a higher-priority suggestion), we would look for argumentless methods returning the expected type, and list them in a `help` note. This had two major shortcomings. Firstly, a lot of the suggestions didn't really make sense (if you used a &str where a String was expected, `.to_ascii_uppercase()` is probably not the solution you were hoping for). Secondly, we weren't generating suggestions from the most useful traits! We address the first problem with an internal `#[rustc_conversion_suggestion]` attribute meant to mark methods that keep the "same value" in the relevant sense, just converting the type. We address the second problem by making `FnCtxt.probe_for_return_type` pass the `ProbeScope::AllTraits` to `probe_op`: this would seem to be safe because grep reveals no other callers of `probe_for_return_type`. Also, structured suggestions are preferred (because they're pretty, but also for RLS and friends). Also also, we make the E0055 autoderef recursion limit error use the one-time-diagnostics set, because we can potentially hit the limit a lot during probing. (Without this, test/ui/did_you_mean/recursion_limit_deref.rs would report "aborting due to 51 errors"). Unfortunately, the trait probing is still not all one would hope for: at a minimum, we don't know how to rule out `into()` in cases where it wouldn't actually work, and we don't know how to rule in `.to_owned()` where it would. Issues #46459 and #46460 have been filed and are ref'd in a FIXME. This is hoped to resolve #42929, #44672, and #45777.
2018-01-03Support `extern` in pathsVadim Petrochenkov-0/+6
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-2/+2
2017-12-28CleanupMatt Peterson-1/+1
2017-12-28Add feature gate macro_lifetime_matcherMatt Peterson-1/+7
2017-12-27Auto merge of #46479 - bkchr:termination_trait, r=arielb1bors-0/+3
Implements RFC 1937: `?` in `main` This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function. Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help! The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
2017-12-27Auto merge of #46803 - estebank:non-ascii-def-span, r=petrochenkovbors-1/+3
Use def span for non-ascii ident feature gate error
2017-12-26Adds termination_trait feature gateBastian Köcher-0/+3
2017-12-24Auto merge of #46888 - cramertj:nested-impl-trait-error, r=nikomatsakisbors-2/+70
Add a feature gate for nested uses of `impl Trait` This allows us to delay stabilization of nested `impl Trait` until we have a plan to solve the problem posed [here](https://github.com/rust-lang/rust/issues/34511#issuecomment-350715858). r? @nikomatsakis
2017-12-21Add a feature gate for nested uses of `impl Trait`Taylor Cramer-2/+70
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-14/+11
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-21Auto merge of #46531 - cramertj:no-mo-modrs, r=nikomatsakisbors-2/+32
Implement non-mod.rs mod statements Fixes https://github.com/rust-lang/rust/issues/45385, cc https://github.com/rust-lang/rust/issues/44660 This will fail tidy right now because it doesn't recognize my UI tests as feature-gate tests. However, I'm not sure if compile-fail will work out either because compile-fail usually requires there to be error patterns in the top-level file, which isn't possible with this feature. What's the recommended way to handle this?
2017-12-20Add nll feature and make nll imply nll_dump_causeSantiago Pastorino-0/+9
2017-12-19Implement non-mod.rs mod statementsTaylor Cramer-2/+32
2017-12-17Use def span for non-ascii ident feature gate errorEsteban Küber-1/+3
2017-12-14feature gate trait aliasesAlex Burka-0/+8
2017-12-13Resolve absolute paths as extern under a feature flagVadim Petrochenkov-0/+3
2017-12-07add closure requirement tests, improve debugging outputNiko Matsakis-0/+6
The overall format is now easier to read. Also, There is now graphviz output, as well as a `#[rustc_regions]` annotation that dumps internal state.
2017-12-06Stabilize abi_sysv64CensoredUsername-8/+4
2017-12-01Preventing moving out of the trait item kindSunjay Varma-1/+1
2017-12-01Specifically gating generic_associated_types feature on associated Type ↵Sunjay Varma-8/+12
declarations
2017-12-01Fixed tidy errorsSunjay Varma-2/+4
2017-12-01Adding feature gateSunjay Varma-0/+9
2017-12-01Auto merge of #45846 - pietroalbini:use-nested-groups, r=petrochenkovbors-0/+26
Add nested groups in imports This PR adds support for nested groups in imports (rust-lang/rfcs#2128, tracking issue #44494). r? @petrochenkov
2017-11-30Implement RFC 2128 (use_nested_groups)Pietro Albini-0/+26
This commit adds support for nested groups inside `use` declarations, such as `use foo::{bar, sub::{baz::Foo, *}};`.
2017-11-29incr.comp.: Remove on-export crate metadata hashing.Michael Woerister-12/+0
2017-11-22Implement in-band lifetime bindingsTaylor Cramer-0/+3
2017-11-21allow loading external files in documentationQuietMisdreavus-0/+10
Partial implementation of https://github.com/rust-lang/rfcs/pull/1990 (needs error reporting work) cc #44732
2017-11-21Auto merge of #45771 - petrochenkov:crate, r=nikomatsakisbors-1/+15
Support `::crate` in paths cc https://github.com/rust-lang/rust/issues/45477 Fixes https://github.com/rust-lang/rust/issues/45229
2017-11-21Auto merge of #45039 - QuietMisdreavus:doc-spotlight, ↵bors-0/+6
r=GuillaumeGomez,QuietMisdreavus show in docs whether the return type of a function impls Iterator/Read/Write Closes #25928 This PR makes it so that when rustdoc documents a function, it checks the return type to see whether it implements a handful of specific traits. If so, it will print the impl and any associated types. Rather than doing this via a whitelist within rustdoc, i chose to do this by a new `#[doc]` attribute parameter, so things like `Future` could tap into this if desired. ### Known shortcomings ~~The printing of impls currently uses the `where` class over the whole thing to shrink the font size relative to the function definition itself. Naturally, when the impl has a where clause of its own, it gets shrunken even further:~~ (This is no longer a problem because the design changed and rendered this concern moot.) The lookup currently just looks at the top-level type, not looking inside things like Result or Option, which renders the spotlights on Read/Write a little less useful: <details><summary>`File::{open, create}` don't have spotlight info (pic of old design)</summary> ![image](https://user-images.githubusercontent.com/5217170/31209495-e59d027e-a950-11e7-9998-ceefceb71c07.png) </details> All three of the initially spotlighted traits are generically implemented on `&mut` references. Rustdoc currently treats a `&mut T` reference-to-a-generic as an impl on the reference primitive itself. `&mut Self` counts as a generic in the eyes of rustdoc. All this combines to create this lovely scene on `Iterator::by_ref`: <details><summary>`Iterator::by_ref` spotlights Iterator, Read, and Write (pic of old design)</summary> ![image](https://user-images.githubusercontent.com/5217170/31209554-50b271ca-a951-11e7-928b-4f83416c8681.png) </details>
2017-11-21Support `::crate` in pathsVadim Petrochenkov-1/+15
2017-11-19std: Add a new wasm32-unknown-unknown targetAlex Crichton-0/+8
This commit adds a new target to the compiler: wasm32-unknown-unknown. This target is a reimagining of what it looks like to generate WebAssembly code from Rust. Instead of using Emscripten which can bring with it a weighty runtime this instead is a target which uses only the LLVM backend for WebAssembly and a "custom linker" for now which will hopefully one day be direct calls to lld. Notable features of this target include: * There is zero runtime footprint. The target assumes nothing exists other than the wasm32 instruction set. * There is zero toolchain footprint beyond adding the target. No custom linker is needed, rustc contains everything. * Very small wasm modules can be generated directly from Rust code using this target. * Most of the standard library is stubbed out to return an error, but anything related to allocation works (aka `HashMap`, `Vec`, etc). * Naturally, any `#[no_std]` crate should be 100% compatible with this new target. This target is currently somewhat janky due to how linking works. The "linking" is currently unconditional whole program LTO (aka LLVM is being used as a linker). Naturally that means compiling programs is pretty slow! Eventually though this target should have a linker. This target is also intended to be quite experimental. I'm hoping that this can act as a catalyst for further experimentation in Rust with WebAssembly. Breaking changes are very likely to land to this target, so it's not recommended to rely on it in any critical capacity yet. We'll let you know when it's "production ready". --- Currently testing-wise this target is looking pretty good but isn't complete. I've got almost the entire `run-pass` test suite working with this target (lots of tests ignored, but many passing as well). The `core` test suite is still getting LLVM bugs fixed to get that working and will take some time. Relatively simple programs all seem to work though! --- It's worth nothing that you may not immediately see the "smallest possible wasm module" for the input you feed to rustc. For various reasons it's very difficult to get rid of the final "bloat" in vanilla rustc (again, a real linker should fix all this). For now what you'll have to do is: cargo install --git https://github.com/alexcrichton/wasm-gc wasm-gc foo.wasm bar.wasm And then `bar.wasm` should be the smallest we can get it! --- In any case for now I'd love feedback on this, particularly on the various integration points if you've got better ideas of how to approach them!