about summary refs log tree commit diff
path: root/src/librustc_feature
AgeCommit message (Collapse)AuthorLines
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-2/+2
fix various typos
2020-03-07Rollup merge of #69667 - JohnTitor:no-debug, r=nikomatsakisMazdak Farrokhzad-13/+2
Remove the `no_debug` feature Context: https://github.com/rust-lang/rust/issues/29721#issuecomment-367642779 r? @nikomatsakis
2020-03-06fix various typosMatthias Krüger-2/+2
2020-03-05Bumped version number for const_eval_limit in active.rsChristoph Schmidler-3/+3
and renamed 'recursion_limit' in limits.rs to simple 'limit' because it does handle other limits too.
2020-03-05Add a new test to reach const_limit setting, although with wrong WARNINGs yetChristoph Schmidler-3/+3
rename feature to const_eval_limit
2020-03-05Prepare const_limit feature gate and attributeChristoph Schmidler-0/+7
2020-03-03Remove the `no_debug` featureYuki Okushi-13/+2
2020-03-01Make `rustc_attrs` tracking issue NoneYuki Okushi-3/+3
2020-02-27Remove "important traits" featureGuillaume Gomez-3/+0
2020-02-27Revert "Mark attributes consumed by `check_mod_attrs` as normal"Tomasz Miąsko-6/+6
This reverts commit d78b22f35ec367368643fe7d6f7e87d01762692b. Those changes were incompatible with incremental compilation since the effect `check_mod_attrs` has with respect to marking the attributes as used is neither persisted nor recomputed.
2020-02-23Mark attributes consumed by `check_mod_attrs` as normalTomasz Miąsko-6/+6
Take advantage of the fact that `check_mod_attrs` marks attributes as used and change their type to normal, so that any remaining uses will be warned about by the unused attribute lint.
2020-02-10Add `#[repr(no_niche)]`.Felix S. Klock II-0/+4
This repr-hint makes a struct/enum hide any niche within from its surrounding type-construction context. It is meant (at least initially) as an implementation detail for resolving issue 68303. We will not stabilize the repr-hint unless someone finds motivation for doing so. (So, declaration of `no_niche` feature lives in section of file where other internal implementation details are grouped, and deliberately leaves out the tracking issue number.) incorporated review feedback, and fixed post-rebase.
2020-02-09Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasperbors-0/+4
Initial implementation of `#![feature(move_ref_pattern)]` Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary. Closes #45600. Tracking issue: #68354. r? @matthewjasper
2020-02-05Selectively disable sanitizer instrumentationTomasz Miąsko-0/+8
Add `no_sanitize` attribute that allows to opt out from sanitizer instrumentation in an annotated function.
2020-02-04Remove the `overlapping_marker_traits` featureAaron Hill-4/+3
See #29864 This has been replaced by `#[feature(marker_trait_attr)]` A few notes: * Due to PR #68057 not yet being in the bootstrap compiler, it's necessary to continue using `#![feature(overlapping_marker_traits)]` under `#[cfg(bootstrap)]` to work around type inference issues. * I've updated tests that used `overlapping_marker_traits` to now use `marker_trait_attr` where applicable The test `src/test/ui/overlap-marker-trait.rs` doesn't make any sense now that `overlapping_marker_traits`, so I removed it. The test `src/test/ui/traits/overlap-permitted-for-marker-traits-neg.rs` now fails, since it's no longer possible to have multiple overlapping negative impls of `Send`. I believe that this is the behavior we want (assuming that `Send` is not going to become a `#[marker]` trait, so I renamed the test to `overlap-permitted-for-marker-traits-neg`
2020-02-02introduce `#![feature(move_ref_pattern)]`Mazdak Farrokhzad-0/+4
2020-02-01Remove or_patterns from INCOMPLETE_FEATURESMatthew Jasper-1/+0
2020-01-20stabilize transparent_enumsMazdak Farrokhzad-3/+2
2020-01-18stabilize slice_patternsMazdak Farrokhzad-3/+2
2020-01-16Fix issue number of `repr128`Yuki Okushi-1/+1
2020-01-16Fix issue number of `member_constraints`Yuki Okushi-1/+1
2020-01-13Fix crate paths in commentsYuki Okushi-1/+2
2020-01-10Auto merge of #65241 - tmiasko:no-std-san, r=alexcrichtonbors-8/+2
build-std compatible sanitizer support ### Motivation When using `-Z sanitizer=*` feature it is essential that both user code and standard library is instrumented. Otherwise the utility of sanitizer will be limited, or its use will be impractical like in the case of memory sanitizer. The recently introduced cargo feature build-std makes it possible to rebuild standard library with arbitrary rustc flags. Unfortunately, those changes alone do not make it easy to rebuild standard library with sanitizers, since runtimes are dependencies of std that have to be build in specific environment, generally not available outside rustbuild process. Additionally rebuilding them requires presence of llvm-config and compiler-rt sources. The goal of changes proposed here is to make it possible to avoid rebuilding sanitizer runtimes when rebuilding the std, thus making it possible to instrument standard library for use with sanitizer with simple, although verbose command: ``` env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-Zsanitizer=thread cargo test -Zbuild-std --target x86_64-unknown-linux-gnu ``` ### Implementation * Sanitizer runtimes are no long packed into crates. Instead, libraries build from compiler-rt are used as is, after renaming them into `librusc_rt.*`. * rustc obtains runtimes from target libdir for default sysroot, so that they are not required in custom build sysroots created with build-std. * The runtimes are only linked-in into executables to address issue #64629. (in previous design it was hard to avoid linking runtimes into static libraries produced by rustc as demonstrated by sanitizer-staticlib-link test, which still passes despite changes made in #64780). cc @kennytm, @japaric, @firstyear, @choller
2020-01-10Introduce `#![feature(half_open_range_patterns)]`.Mazdak Farrokhzad-0/+3
This feature adds `X..`, `..X`, and `..=X` patterns.
2020-01-09Add `const_trait_bound_opt_out` feature gateDylan MacKenzie-0/+4
2020-01-09Add `const_trait_impl` feature gateDylan MacKenzie-0/+4
2020-01-09Remove sanitizer_runtime attributeTomasz Miąsko-8/+2
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-8/+8
2019-12-30Make things build againVadim Petrochenkov-1/+1
2019-12-24Format librustc_featureMark Rousskov-30/+44
Use #[rustfmt::skip] on the tidy-parsed macro invocations
2019-12-23Remove `bindings_after_at` from `INCOMPLETE_FEATURES`.Mazdak Farrokhzad-1/+0
2019-12-23Introduce `#![feature(bindings_after_at)]`.Mazdak Farrokhzad-0/+5
Under the gate, `x @ Some(y)` is allowed. This is subject to various restrictions for soundness.
2019-12-15Auto merge of #67216 - ecstatic-morse:const-loop, r=oli-obkbors-0/+14
Enable `loop` and `while` in constants behind a feature flag This PR is an initial implementation of #52000. It adds a `const_loop` feature gate, which allows `while` and `loop` expressions through both HIR and MIR const-checkers if enabled. `for` expressions remain forbidden by the HIR const-checker, since they desugar to a call to `IntoIterator::into_iter`, which will be rejected anyways. `while` loops also require [`#![feature(const_if_match)]`](https://github.com/rust-lang/rust/pull/66507), since they have a conditional built into them. The diagnostics from the HIR const checker will suggest this to the user. r? @oli-obk cc @rust-lang/wg-const-eval
2019-12-14Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, ↵bors-2/+3
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-2/+3
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-13Document `Features::enabled`ecstatic-morse-0/+3
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-13Use correct nightly version for featureDylan MacKenzie-1/+1
2019-12-13Replace `Index` impl with `enabled` methodDylan MacKenzie-6/+2
2019-12-13Improve message when active feature indexing panicsDylan MacKenzie-1/+1
2019-12-13Add feature gate for `const_loop`Dylan MacKenzie-0/+3
2019-12-13Get active features dynamically by their `Symbol`Dylan MacKenzie-0/+12
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+2
functions with a `const` modifier
2019-12-13Reuse the `staged_api` feature for `rustc_const_unstable`Oliver Scherer-8/+2
2019-12-07Auto merge of #65881 - anp:implicit-caller-location, r=eddyb,oli-obkbors-1/+0
Implement #[track_caller] attribute. (RFC 2091 4/N) Implements the `#[track_caller]` attribute in both const and codegen contexts. The const implementation walks up the stack to find the nearest untracked callsite. The codegen implementation adds an implicit argument to tracked function calls, and populates it with either a call to the previously-landed intrinsic or if the caller has `#[track_caller]` with a copy of the location passed to the current function. Also includes a little cleanup and a few comments in the other caller location areas. [Depends on: 65664](https://github.com/rust-lang/rust/pull/65664) [RFC 2091 text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) [Tracking issue](https://github.com/rust-lang/rust/issues/47809) [Tracking doc](https://paper.dropbox.com/doc/track_rfc_2091_impl-notes--Anf1NwnIb0xcRv31YLIadyj0Ag-rwCdRc2fi2yvRZ7syGZ9q#:uid=863513134494965680023183&h2=TODO-actually-pass-location-to)
2019-12-06Rollup merge of #66606 - christianpoveda:mut-refs-in-const-fn, r=oli-obkMazdak Farrokhzad-0/+3
Add feature gate for mut refs in const fn r? @oli-obk
2019-12-05Remove #[track_caller] from incomplete features list.Adam Perry-1/+0
2019-12-03Check intrinsics for callability in const fnsMahmut Bulut-4/+0
2019-12-02Rename feature gateChristian Poveda-1/+1
2019-12-02Add feature gate for &mut in const fnsChristian Poveda-0/+3
2019-12-02Rollup merge of #66245 - tmiasko:cfg-sanitize, r=oli-obkRalf Jung-0/+4
Conditional compilation for sanitizers Configure sanitize option when compiling with a sanitizer to make it possible to execute different code depending on whether given sanitizer is enabled or not.