Commit Graph

434 Commits

Author SHA1 Message Date
jumbatm
f6faf0b2e7 Clean up const-hack from #63810 2019-12-27 23:21:27 +10:00
Mark Rousskov
df4d490038 Minimize unsafety in encode_utf8
Use slice patterns to avoid having to skip bounds checking
2019-12-23 20:46:42 -05:00
Mazdak Farrokhzad
1de2705c79
Rollup merge of #67466 - oli-obk:const_intrinsic, r=Centril
Require const stability attributes on intrinsics to be able to use them in constant contexts

r? @Centril

finally fixes #61495

cc @RalfJung
2019-12-23 15:16:23 +01:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Oliver Scherer
9ee16e14c5 Require const stability attributes on intrinsics to be able to use them in constant contexts 2019-12-20 23:15:50 +01:00
Mark Rousskov
82184440ec Propagate cfg bootstrap 2019-12-18 12:16:19 -05:00
bors
6f829840f7 Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, 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-14 22:02:59 +00:00
Niko Matsakis
d286113024 Revert "Stabilize the never_type, written !."
This reverts commit 15c30ddd69.
2019-12-14 09:01:09 -05:00
Oliver Scherer
d75c7530f3 Reuse the staged_api feature for rustc_const_unstable 2019-12-13 11:27:01 +01:00
Adam Perry
bc6e66eb3a Implement core::panic::Location::caller using #[track_caller]. 2019-12-05 21:08:35 -08:00
Remy Rakic
bc0df79db3 libcore: rnable 2 unstable const fn features
So that we can bootstrap successfully
2019-12-05 15:01:30 +01:00
Mazdak Farrokhzad
15c30ddd69 Stabilize the never_type, written !. 2019-11-21 14:55:32 +01:00
Mark Rousskov
997feacddd Snap cfgs 2019-11-12 16:36:57 -05:00
Mazdak Farrokhzad
1c7595fd0f gate rustc_on_unimplemented under rustc_attrs 2019-11-06 07:34:51 +01:00
Ralf Jung
4819cba461 work around aggressive syntax feature gating 2019-10-30 20:59:15 +01:00
David Wood
e0590ea76f
RFC 2008: Stabilization
This commit stabilizes RFC 2008 (#44109) by removing the feature gate.

Signed-off-by: David Wood <david@davidtw.co>
2019-10-25 09:34:05 +01:00
Jon Gjengset
45aca119a6
Stabilize mem::take (mem_take)
Tracking issue: https://github.com/rust-lang/rust/issues/61129
2019-10-08 18:04:18 -04:00
Mark Rousskov
f359a94849 Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
Oliver Scherer
7767e7fb16 Stabilize str::len, [T]::len, is_empty and str::as_bytes as const fn 2019-09-24 12:56:44 +02:00
Alex Crichton
b3f95f460f Move --cfg bootstrap out of rustc.rs
Instead let's do this via `RUSTFLAGS` in `builder.rs`. Currently
requires a submodule update of `stdarch` to fix a problem with previous
compilers.
2019-09-23 09:34:44 -07:00
bors
45859b7ca7 Auto merge of #63118 - Centril:stabilize-bind-by-move, r=matthewjasper
Stabilize `bind_by_move_pattern_guards` in Rust 1.39.0

Closes https://github.com/rust-lang/rust/issues/15287.

After stabilizing `#![feature(bind_by_move_pattern_guards)]`, you can now use bind-by-move bindings in patterns and take references to those bindings in `if` guards of `match` expressions. For example, the following now becomes legal:

```rust
fn main() {
    let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]);

    match array {
        nums
//      ---- `nums` is bound by move.
            if nums.iter().sum::<u8>() == 10
//                 ^------ `.iter()` implicitly takes a reference to `nums`.
        => {
            drop(nums);
//          --------- Legal as `nums` was bound by move and so we have ownership.
        }
        _ => unreachable!(),
    }
}
```

r? @matthewjasper
2019-09-09 12:46:59 +00:00
Mazdak Farrokhzad
e362ff9feb bootstrap -> boostrap_stdarch_ignore_this 2019-09-08 01:39:24 +02:00
Mazdak Farrokhzad
0356813b27 Dont use gate bind_by_move_pattern_guards internally. 2019-09-08 01:27:10 +02:00
varkor
0f0e1c1691 Move libcore/bool/mod.rs to libcore/bool.rs 2019-09-07 17:04:19 +01:00
varkor
f0386a10e0 Add "bool" lang item 2019-09-07 13:16:18 +01:00
Mark Rousskov
2601c86487 Handle cfg(bootstrap) throughout 2019-08-14 05:39:53 -04:00
Ilija Tovilo
3a6a29b4ec
Use associated_type_bounds where applicable - closes #61738 2019-08-08 22:39:15 +02:00
Mazdak Farrokhzad
8a90173239 Allow 'incomplete_features' in libcore/alloc. 2019-07-30 10:32:43 +02:00
Vadim Petrochenkov
434152157f Remove lint annotations in specific crates that are already enforced by rustbuild
Remove some random unnecessary lint `allow`s
2019-07-28 18:46:24 +03:00
Mazdak Farrokhzad
f87f3db3a2
Rollup merge of #62978 - LukasKalbertodt:remove-array-impl-bootstrap-cfg, r=Mark-Simulacrum
Remove `cfg(bootstrap)` code for array implementations

In https://github.com/rust-lang/rust/pull/62435 ("Use const generics for array impls [part 1]") the old macro-based implementations were not removed but still used with `cfg(bootstrap)` since the bootstrap compiler had some problems with const generics at the time. This does not seem to be the case anymore, so there is no reason to keep the old code.

Unfortunately, the diff is pretty ugly because much of the code was indented by one level before. The change is pretty trivial, though.

PS: I did not run the full test suite locally. There are 40°C outside and 31°C inside my room. I don't want my notebook to melt. I hope that CI is green.

r? @scottmcm
2019-07-25 23:21:11 +02:00
Lukas Kalbertodt
9d39758d14
Remove cfg(bootstrap) code for array implementations
In PR #62435 ("Use const generics for array impls [part 1]") the old
macro-based implementations were not removed but still used with
`cfg(bootstrap)` since the bootstrap compiler had some problems with
const generics at the time. This does not seem to be the case anymore,
so there is no reason to keep the old code.
2019-07-25 18:06:26 +02:00
Brian Cain
4b339688b5 add support for hexagon-unknown-linux-musl 2019-07-22 09:44:58 -05:00
gnzlbg
677cf3de3a Add rtm and f16c features to libcore 2019-07-15 14:05:39 +02:00
gnzlbg
77c14a5c5f Update the stdarch submodule 2019-07-15 14:05:28 +02:00
bors
6e310f2aba Auto merge of #62435 - scottmcm:constrained-array-impls, r=centril
Use const generics for array impls [part 1]

Part 1 of #61415, following the plan in https://github.com/rust-lang/rust/issues/61415#issuecomment-497922482

Found a way that works 🙃
2019-07-07 18:37:08 +00:00
Scott McMurray
d6a9793722 Use const generics for array impls, restricted to 0..=32
- uses a never-stable core::array::LengthAtMost32 to bound the impls
- includes a custom error message to avoid mentioning LengthAtMost32 too often
- doesn't use macros for the slice implementations to avoid #62433
2019-07-07 11:31:38 -07:00
Vadim Petrochenkov
ab112cab03 Improve documentation for built-in macros 2019-07-06 16:59:08 +03:00
Mazdak Farrokhzad
0224532493
Rollup merge of #62133 - petrochenkov:norustc, r=eddyb
Feature gate `rustc` attributes harder

Fixes https://github.com/rust-lang/rust/issues/62116
2019-07-05 20:26:54 +02:00
Mark Rousskov
8a7dded1a2 Switch master to 1.38 2019-07-04 11:26:57 -04:00
Chris Gregory
b0c199a969 Enable mem_take feature in relevant crates 2019-07-01 20:21:53 -07:00
Vadim Petrochenkov
0ffb6438a6 Make sure #[rustc_doc_only_macro] and other rustc attributes are registered 2019-06-30 12:47:33 +03:00
bors
d6884aedd5 Auto merge of #61874 - jonas-schievink:remove-rem-output-default, r=Centril
Remove the default type of `Rem::Output`

Associated type defaults are not yet stable, and `Rem` is the only trait that specifies a default. Let's see what breaks when it's removed.

cc https://github.com/rust-lang/rust/pull/61812#issuecomment-502394566
cc @Centril

@bors try
2019-06-22 17:59:05 +00:00
Michael Bradshaw
0f9dc6c48e Make MaybeUninit #[repr(transparent)]
Tracking issue: #60405
2019-06-18 06:31:23 -07:00
Jonas Schievink
ba30dcad2f Remove the default type of Rem::Output 2019-06-15 22:22:06 +02:00
Vadim Petrochenkov
8049e6199b Remove unused #![feature(custom_attribute)]s 2019-06-08 23:55:24 +03:00
Mazdak Farrokhzad
654854fdb5
Rollup merge of #61376 - czipperz:bound-cloned, r=sfackler
Add Bound::cloned()

Suggested by #61356
2019-06-06 22:39:09 +02:00
Chris Gregory
c3824919fd Enable feature bound_cloned 2019-05-31 21:17:32 -05:00
Lzu Tao
1c26bbf628 Stabilize reverse_bits feature 2019-05-31 04:43:53 +00:00
Ralf Jung
b7afe777f7 stabilize core parts of MaybeUninit and deprecate mem::uninitialized in the future
Also expand the documentation a bit
2019-05-20 10:44:02 +02:00
Mazdak Farrokhzad
dbfbadeac4 libcore: deny more... 2019-04-19 01:37:12 +02:00