Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stabilize cfg_attr_multi #57332

Merged
merged 4 commits into from Jan 8, 2019

Conversation

Projects
None yet
6 participants
@Dylan-DPC
Copy link
Member

Dylan-DPC commented Jan 4, 2019

Stabilizes cfg_attr_multi feature

Related to #54881

Will add the lint in a seperate PR

r? @Centril

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Jan 4, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:1b56faa0:start=1546586293616002126,finish=1546586401542122060,duration=107926119934
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:05:30]    Compiling rustc_data_structures v0.0.0 (/checkout/src/librustc_data_structures)
[00:05:33]    Compiling arena v0.0.0 (/checkout/src/libarena)
[00:05:33]    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
[00:05:38]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:05:51] error: unused import: `emit_feature_err`
[00:05:51]  --> src/libsyntax/config.rs:8:5
[00:05:51] 8 |     emit_feature_err,
[00:05:51]   |     ^^^^^^^^^^^^^^^^
[00:05:51]   |
[00:05:51]   = note: `-D unused-imports` implied by `-D warnings`

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

Show resolved Hide resolved src/test/ui/conditional-compilation/cfg-attr-parse.rs Outdated
Show resolved Hide resolved src/libsyntax/feature_gate.rs Outdated

@Centril Centril added the relnotes label Jan 4, 2019

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 4, 2019

You have some merge conflicts that'll need to be resolved by rebasing; other than that it looks good.

@Dylan-DPC

This comment has been minimized.

Copy link
Member Author

Dylan-DPC commented Jan 5, 2019

Damn some issue with the rebase.. let me try again

@Dylan-DPC Dylan-DPC force-pushed the Dylan-DPC:feature/stabilise-cfg-attr branch from f148a68 to fdc2f54 Jan 5, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Jan 5, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:03b26f80:start=1546678024535720618,finish=1546678025427659892,duration=891939274
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:59:12] .................................................................................................... 300/5293
[00:59:14] .................................................................................................... 400/5293
[00:59:18] .................................................................................................... 500/5293
[00:59:21] ...............................i.................................................................... 600/5293
[00:59:25] .................................................................................FF................. 700/5293
[00:59:36] .......................................................................i...............i............ 900/5293
[00:59:39] .................................................................................................iii 1000/5293
[00:59:43] ii.................................................................................................. 1100/5293
[00:59:45] .................................................................................................... 1200/5293
---
[01:01:52] .................................................................................................... 4800/5293
[01:01:57] .................................................................................................... 4900/5293
[01:02:00] .................................................................................................... 5000/5293
[01:02:06] .................................................................................................... 5200/5293
xperimental","highlight_start":29,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"add #![feature(no_core)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: no_core is experimental (see issue #29639)\n  --> /checkout/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs:4:29\n   |\nLL | #![cfg_attr(broken, no_std, no_core)] //~ ERROR no_core is experimental\n   |                             ^^^^^^^\n   |\n   = help: add #![feature(no_core)] to the crate attributes to enable\n\n"}
[01:02:09] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:02:09] {"message":"For more information about this error, try `rustc --explain E0658`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0658`.\n"}
[01:02:09] ------------------------------------------
[01:02:09] 
[01:02:09] thread '[ui] ui/conditional-compilation/cfg-attr-multi-invalid-2.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:02:09] 
---
[01:02:09] 
[01:02:09] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:495:22
[01:02:09] 
[01:02:09] 
[01:02:09] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:02:09] 
[01:02:09] 
[01:02:09] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:02:09] Build completed unsuccessfully in 0:04:04
[01:02:09] Build completed unsuccessfully in 0:04:04
[01:02:09] Makefile:48: recipe for target 'check' failed
[01:kout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:030bae98
travis_time:start:030bae98
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:03a44134
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors

This comment was marked as resolved.

Copy link
Contributor

bors commented Jan 6, 2019

☔️ The latest upstream changes (presumably #57272) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC Dylan-DPC force-pushed the Dylan-DPC:feature/stabilise-cfg-attr branch from 268204a to 13f8ad8 Jan 7, 2019

@Centril

Centril approved these changes Jan 8, 2019

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 8, 2019

Looks good; thanks!

Giving prio to this since it's a stabilization.

@bors r+ p=1

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 8, 2019

📌 Commit 13f8ad8 has been approved by Centril

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 8, 2019

⌛️ Testing commit 13f8ad8 with merge 7ad470c...

bors added a commit that referenced this pull request Jan 8, 2019

Auto merge of #57332 - Dylan-DPC:feature/stabilise-cfg-attr, r=Centril
stabilize cfg_attr_multi

Stabilizes cfg_attr_multi feature

Related to #54881

Will add the lint in a seperate PR

r? @Centril
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 8, 2019

☀️ Test successful - status-appveyor, status-travis
Approved by: Centril
Pushing 7ad470c to master...

@bors bors merged commit 13f8ad8 into rust-lang:master Jan 8, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 8, 2019

📣 Toolstate changed by #57332!

Tested on commit 7ad470c.
Direct link to PR: #57332

💔 rls on linux: test-pass → test-fail (cc @nrc @Xanewok, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jan 8, 2019

📣 Toolstate changed by rust-lang/rust#57332!
Tested on commit rust-lang/rust@7ad470c.
Direct link to PR: <rust-lang/rust#57332>

💔 rls on linux: test-pass → test-fail (cc @nrc @Xanewok, @rust-lang/infra).
@Xanewok

This comment has been minimized.

Copy link
Member

Xanewok commented Jan 8, 2019

I believe this is spurious, (un?)fortunately:

thread 'cmd_changing_workspace_lib_retains_bin_diagnostics' panicked at 'expected bin error diagnostic', src/libcore/option.rs:1040:5

@bors bors referenced this pull request Jan 8, 2019

Merged

Stabilize extern_crate_self #57407

@Dylan-DPC Dylan-DPC deleted the Dylan-DPC:feature/stabilise-cfg-attr branch Jan 8, 2019

@Centril Centril added the T-lang label Jan 10, 2019

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 3, 2019

he
Update rust to version 1.33.0.
Pkgsrc changes:
 * Bump required rust version to build to 1.32.0.
 * Adapt patches to changed file locations.
 * Since we now patch some more vendor/ modules, doctor the corresponding
   .cargo-checksum.json files accordingly

Upstream changes:

Version 1.33.0 (2019-02-28)
==========================

Language
--------
- [You can now use the `cfg(target_vendor)` attribute.][57465] E.g.
  `#[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }`
- [Integer patterns such as in a match expression can now be exhaustive.][56362]
  E.g. You can have match statement on a `u8` that covers `0..=255` and
  you would no longer be required to have a `_ => unreachable!()` case.
- [You can now have multiple patterns in `if let` and `while let`
  expressions.][57532] You can do this with the same syntax as a `match`
  expression. E.g.
  ```rust
  enum Creature {
      Crab(String),
      Lobster(String),
      Person(String),
  }

  fn main() {
      let state = Creature::Crab("Ferris");

      if let Creature::Crab(name) | Creature::Person(name) = state {
          println!("This creature's name is: {}", name);
      }
  }
  ```
- [You can now have irrefutable `if let` and `while let` patterns.][57535]
  Using this feature will by default produce a warning as this behaviour
  can be unintuitive. E.g. `if let _ = 5 {}`
- [You can now use `let` bindings, assignments, expression statements,
  and irrefutable pattern destructuring in const functions.][57175]
- [You can now call unsafe const functions.][57067] E.g.
  ```rust
  const unsafe fn foo() -> i32 { 5 }
  const fn bar() -> i32 {
      unsafe { foo() }
  }
  ```
- [You can now specify multiple attributes in a `cfg_attr` attribute.][57332]
  E.g. `#[cfg_attr(all(), must_use, optimize)]`
- [You can now specify a specific alignment with the `#[repr(packed)]`
  attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a
  struct with an alignment of 2 bytes and a size of 6 bytes.
- [You can now import an item from a module as an `_`.][56303] This allows you
  to import a trait's impls, and not have the name in the namespace. E.g.
  ```rust
  use std::io::Read as _;

  // Allowed as there is only one `Read` in the module.
  pub trait Read {}
  ```
- [You may now use `Rc`, `Arc`, and `Pin` as method receivers][56805].

Compiler
--------
- [You can now set a linker flavor for `rustc` with the `-Clinker-flavor`
  command line argument.][56351]
- [The mininum required LLVM version has been bumped to 6.0.][56642]
- [Added support for the PowerPC64 architecture on FreeBSD.][57615]
- [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to
  tier 2 support.][57130] Visit the [platform support][platform-support]
  page for information on Rust's platform support.
- [Added support for the `thumbv7neon-linux-androideabi` and
  `thumbv7neon-unknown-linux-gnueabihf` targets.][56947]
- [Added support for the `x86_64-unknown-uefi` target.][56769]

Libraries
---------
- [The methods `overflowing_{add, sub, mul, shl, shr}` are now `const`
  functions for all numeric types.][57566]
- [The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul,
  shl, shr}`
  are now `const` functions for all numeric types.][57105]
- [The methods `is_positive` and `is_negative` are now `const` functions for
  all signed numeric types.][57105]
- [The `get` method for all `NonZero` types is now `const`.][57167]
- [The methods `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`,
  `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all
  numeric types.][57234]
- [`Ipv4Addr::new` is now a `const` function][57234]

Stabilized APIs
---------------
- [`unix::FileExt::read_exact_at`]
- [`unix::FileExt::write_all_at`]
- [`Option::transpose`]
- [`Result::transpose`]
- [`convert::identity`]
- [`pin::Pin`]
- [`marker::Unpin`]
- [`marker::PhantomPinned`]
- [`Vec::resize_with`]
- [`VecDeque::resize_with`]
- [`Duration::as_millis`]
- [`Duration::as_micros`]
- [`Duration::as_nanos`]


Cargo
-----
- [Cargo should now rebuild a crate if a file was modified during the initial
  build.][cargo/6484]

Compatibility Notes
-------------------
- The methods `str::{trim_left, trim_right, trim_left_matches,
  trim_right_matches}` are now deprecated in the standard library, and their
  usage will now produce a warning.  Please use the `str::{trim_start,
  trim_end, trim_start_matches, trim_end_matches}` methods instead.
- The `Error::cause` method has been deprecated in favor of `Error::source`
  which supports downcasting.

[55982]: rust-lang/rust#55982
[56303]: rust-lang/rust#56303
[56351]: rust-lang/rust#56351
[56362]: rust-lang/rust#56362
[56642]: rust-lang/rust#56642
[56769]: rust-lang/rust#56769
[56805]: rust-lang/rust#56805
[56947]: rust-lang/rust#56947
[57049]: rust-lang/rust#57049
[57067]: rust-lang/rust#57067
[57105]: rust-lang/rust#57105
[57130]: rust-lang/rust#57130
[57167]: rust-lang/rust#57167
[57175]: rust-lang/rust#57175
[57234]: rust-lang/rust#57234
[57332]: rust-lang/rust#57332
[57465]: rust-lang/rust#57465
[57532]: rust-lang/rust#57532
[57535]: rust-lang/rust#57535
[57566]: rust-lang/rust#57566
[57615]: rust-lang/rust#57615
[cargo/6484]: rust-lang/cargo#6484
[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at
[`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at
[`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose
[`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose
[`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html
[`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html
[`marker::Unpin`]: https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html
[`marker::PhantomPinned`]: https://doc.rust-lang.org/nightly/std/marker/struct.PhantomPinned.html
[`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with
[`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.resize_with
[`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_millis
[`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_micros
[`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_nanos
[platform-support]: https://forge.rust-lang.org/platform-support.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.