1. 10 3月, 2022 17 次提交
  2. 09 3月, 2022 23 次提交
    • L
    • M
      Add documentation about lifetimes to thread::scope. · 4d56c156
      Mara Bos 提交于
      4d56c156
    • B
      keep ERROR in message · 021c3b01
      b-naber 提交于
      021c3b01
    • B
      manually bless 32-bit stderr · 18bb2dd7
      b-naber 提交于
      18bb2dd7
    • R
      Ignore `close_read_wakes_up` test on SGX platform · 491350ce
      Raoul Strackx 提交于
      491350ce
    • B
      normalization change and rebase · 26fe5506
      b-naber 提交于
      26fe5506
    • B
      bless tests · 8a811a12
      b-naber 提交于
      8a811a12
    • B
      treat all mir::Constant values as ConstantKind::Val · 40e4bd2d
      b-naber 提交于
      40e4bd2d
    • B
      Auto merge of #94515 - estebank:tweak-move-error, r=davidtwco · 10dccdc7
      bors 提交于
      Tweak move error
      
      Point at method definition that causes type to be consumed.
      
      Fix #94056.
      10dccdc7
    • B
      Auto merge of #94761 - Dylan-DPC:rollup-v4emqsy, r=Dylan-DPC · 6045c34f
      bors 提交于
      Rollup of 6 pull requests
      
      Successful merges:
      
       - #94312 (Edit `rustc_trait_selection::infer::lattice` docs)
       - #94583 (Add a team for '`@rustbot` ping fuchsia')
       - #94686 (Do not allow `#[rustc_legacy_const_generics]` on methods)
       - #94699 (BTree: remove dead data needlessly complicating insert)
       - #94756 (Use `unreachable!` for an unreachable code path)
       - #94759 (Update cargo)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      6045c34f
    • D
      Rollup merge of #94759 - ehuss:update-cargo, r=ehuss · 822c4b6a
      Dylan DPC 提交于
      Update cargo
      
      11 commits in 3d6970d50e30e797b8e26b2b9b1bdf92dc381f34..65c82664263feddc5fe2d424be0993c28d46377a
      2022-02-28 19:29:07 +0000 to 2022-03-09 02:32:56 +0000
      - Remove remaining 2 warn(clippy::*) instances (rust-lang/cargo#10438)
      - Use `available_parallelism` instead of `num_cpus` (rust-lang/cargo#10427)
      - Wait up to one second while waiting for curl (rust-lang/cargo#10456)
      - Improve code coverage (rust-lang/cargo#10460)
      - Don't recommend leaking tokens into the console history (rust-lang/cargo#10458)
      - fix some typos (rust-lang/cargo#10454)
      - Use `extend` instead of `push`ing in a loop (rust-lang/cargo#10453)
      - Use locked_version more (rust-lang/cargo#10449)
      - Disable dependabot (rust-lang/cargo#10443)
      - Update git2 dependencies (rust-lang/cargo#10442)
      - Stop gating stable features (rust-lang/cargo#10434)
      822c4b6a
    • D
      Rollup merge of #94756 - ChrisDenton:unreachable, r=yaahc · 28d06bde
      Dylan DPC 提交于
      Use `unreachable!` for an unreachable code path
      
      Closes #73212
      28d06bde
    • D
      Rollup merge of #94699 - ssomers:btree_prune_insert, r=Dylan-DPC · 4de06d45
      Dylan DPC 提交于
      BTree: remove dead data needlessly complicating insert
      
      Possibly needless instructions generated
      
      r? rust-lang/libs
      r? ``@Amanieu``
      cc ``@frank-king``
      4de06d45
    • D
      Rollup merge of #94686 - ChayimFriedman2:issue-94629, r=jackh726 · 3ce01f71
      Dylan DPC 提交于
      Do not allow `#[rustc_legacy_const_generics]` on methods
      
      It caused an ICE since `item` was `None`.
      
      Fixes #94629.
      3ce01f71
    • D
      Rollup merge of #94583 - dtolnay:fuchsia, r=Mark-Simulacrum · d365d5ee
      Dylan DPC 提交于
      Add a team for '@rustbot ping fuchsia'
      
      I was looking for this in response to https://github.com/rust-lang/rust/pull/93858#issuecomment-1041367498.
      
      Depends on https://github.com/rust-lang/team/pull/710.
      d365d5ee
    • D
      Rollup merge of #94312 - pierwill:fix-94311-lattice-docs, r=jackh726 · 2b17c276
      Dylan DPC 提交于
      Edit `rustc_trait_selection::infer::lattice` docs
      
      Closes #94311.
      
      Removes mentions of outdated/missing type and filename (`infer.rs` and `LatticeValue`).
      2b17c276
    • E
      Update cargo · 6fee0b0b
      Eric Huss 提交于
      6fee0b0b
    • B
      Auto merge of #94750 - cuviper:dirent64_min, r=joshtriplett · 163c207f
      bors 提交于
      unix: reduce the size of DirEntry
      
      On platforms where we call `readdir` instead of `readdir_r`, we store
      the name as an allocated `CString` for variable length. There's no point
      carrying around a full `dirent64` with its fixed-length `d_name` too.
      163c207f
    • C
      Use `unreachable!` for an unreachable code path · 57442beb
      Chris Denton 提交于
      57442beb
    • B
      Auto merge of #94751 - Dylan-DPC:rollup-zr7viw0, r=Dylan-DPC · 803a7593
      bors 提交于
      Rollup of 5 pull requests
      
      Successful merges:
      
       - #94689 (Use impl substs in `#[rustc_on_unimplemented]`)
       - #94714 (Enable `close_read_wakes_up` test on Windows)
       - #94723 (Add core::hint::must_use)
       - #94724 (unix: Avoid name conversions in `remove_dir_all_recursive`)
       - #94730 (Reverted atomic_mut_ptr feature removal causing compilation break)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      803a7593
    • D
      Rollup merge of #94730 - msabansal:sabansal/b-atomic-mut-ptr, r=Dylan-DPC · 5629026e
      Dylan DPC 提交于
      Reverted atomic_mut_ptr feature removal causing compilation break
      
      Fixes a regression introduced as part of https://github.com/rust-lang/rust/pull/94546
      
      Std no longer compiles on nightly while using the following commnd:
      
      export RUSTFLAGS='-C target-feature=+atomics,+bulk-memory'
      cargo build --target wasm32-unknown-unknown -Z build-std=panic_abort,std
      
      I can help add tests to avoid future breaks but i couldn't understand the test framework
      5629026e
    • D
      Rollup merge of #94724 - cuviper:rmdirall-cstr, r=Dylan-DPC · a67b6299
      Dylan DPC 提交于
      unix: Avoid name conversions in `remove_dir_all_recursive`
      
      Each recursive call was creating an `OsString` for a `&Path`, only for
      it to be turned into a `CString` right away. Instead we can directly
      pass `.name_cstr()`, saving two allocations each time.
      a67b6299
    • D
      Rollup merge of #94723 - dtolnay:mustuse, r=Mark-Simulacrum · ff54e344
      Dylan DPC 提交于
      Add core::hint::must_use
      
      The example code in this documentation is minimized from a real-world situation in the `anyhow` crate where this function would have been valuable.
      
      Having this provided by the standard library is especially useful for proc macros, even more than for macro_rules. That's because proc macro crates aren't allowed to export anything other than macros, so they couldn't make their own `must_use` function for their macro-generated code to call.
      
      <br>
      
      ## Rendered documentation
      
      > An identity function that causes an `unused_must_use` warning to be triggered if the given value is not used (returned, stored in a variable, etc) by the caller.
      >
      > This is primarily intended for use in macro-generated code, in which a [`#[must_use]` attribute][must_use] either on a type or a function would not be convenient.
      >
      > [must_use]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute
      >
      > ### Example
      >
      > ```rust
      > #![feature(hint_must_use)]
      >
      > use core::fmt;
      >
      > pub struct Error(/* ... */);
      >
      > #[macro_export]
      > macro_rules! make_error {
      >     ($($args:expr),*) => {
      >         core::hint::must_use({
      >             let error = $crate::make_error(core::format_args!($($args),*));
      >             error
      >         })
      >     };
      > }
      >
      > // Implementation detail of make_error! macro.
      > #[doc(hidden)]
      > pub fn make_error(args: fmt::Arguments<'_>) -> Error {
      >     Error(/* ... */)
      > }
      >
      > fn demo() -> Option<Error> {
      >     if true {
      >         // Oops, meant to write `return Some(make_error!("..."));`
      >         Some(make_error!("..."));
      >     }
      >     None
      > }
      > ```
      >
      > In the above example, we'd like an `unused_must_use` lint to apply to the value created by `make_error!`. However, neither `#[must_use]` on a struct nor `#[must_use]` on a function is appropriate here, so the macro expands using `core::hint::must_use` instead.
      >
      > - We wouldn't want `#[must_use]` on the `struct Error` because that would make the following unproblematic code trigger a warning:
      >
      >   ```rust
      >   fn f(arg: &str) -> Result<(), Error>
      >
      >   #[test]
      >   fn t() {
      >       // Assert that `f` returns error if passed an empty string.
      >       // A value of type `Error` is unused here but that's not a problem.
      >       f("").unwrap_err();
      >   }
      >   ```
      >
      > - Using `#[must_use]` on `fn make_error` can't help because the return value *is* used, as the right-hand side of a `let` statement. The `let` statement looks useless but is in fact necessary for ensuring that temporaries within the `format_args` expansion are not kept alive past the creation of the `Error`, as keeping them alive past that point can cause autotrait issues in async code:
      >
      >   ```rust
      >   async fn f() {
      >       // Using `let` inside the make_error expansion causes temporaries like
      >       // `unsync()` to drop at the semicolon of that `let` statement, which
      >       // is prior to the await point. They would otherwise stay around until
      >       // the semicolon on *this* statement, which is after the await point,
      >       // and the enclosing Future would not implement Send.
      >       log(make_error!("look: {:p}", unsync())).await;
      >   }
      >
      >   async fn log(error: Error) {/* ... */}
      >
      >   // Returns something without a Sync impl.
      >   fn unsync() -> *const () {
      >       0 as *const ()
      >   }
      >   ```
      ff54e344