1. 05 7月, 2021 29 次提交
  2. 04 7月, 2021 11 次提交
    • N
    • N
      be conservative in has_significant_drop · 75c17224
      Niko Matsakis 提交于
      75c17224
    • N
      allow inference vars in type_implements_trait · 40ee019c
      Niko Matsakis 提交于
      40ee019c
    • N
      remove unused Option · 26f7030b
      Niko Matsakis 提交于
      26f7030b
    • T
      E0716: clarify that equivalent code example is erroneous · 92197a55
      Taylor Yu 提交于
      In E0716, there is a code block that is equivalent to the erroneous
      code example. Especially when viewed with `rustc --explain`, it's
      not obvious that it is also erroneous, and some users have been
      confused when they try to change their code to match the erroneous
      equivalent.
      92197a55
    • B
      Auto merge of #86048 - nbdd0121:no_floating_point, r=Amanieu · 90442458
      bors 提交于
      core: add unstable no_fp_fmt_parse to disable float formatting code
      
      In some projects (e.g. kernel), floating point is forbidden. They can disable
      hardware floating point support and use `+soft-float` to avoid fp instructions
      from being generated, but as libcore contains the formatting code for `f32`
      and `f64`, some fp intrinsics are depended. One could define stubs for these
      intrinsics that just panic [1], but it means that if any formatting functions
      are accidentally used, mistake can only be caught during the runtime rather
      than during compile-time or link-time, and they consume a lot of space without
      LTO.
      
      This patch provides an unstable cfg `no_fp_fmt_parse` to disable these.
      A panicking stub is still provided for the `Debug` implementation (unfortunately)
      because there are some SIMD types that use `#[derive(Debug)]`.
      
      [1]: https://lkml.org/lkml/2021/4/14/1028
      90442458
    • B
      Auto merge of #86213 - jhpratt:stabilize-const-from_utf8_unchecked, r=JohnTitor · 308fc232
      bors 提交于
      Stabilize `str::from_utf8_unchecked` as `const`
      
      This stabilizes `unsafe fn str::from_utf8_unchecked` as `const` pending FCP on #75196. By the time FCP finishes, the beta will have already been cut, so I've set 1.55 as the stable-since version.
      
      (should also be +relnotes but I don't have the permission to do that)
      
      r? `@m-ou-se`
      
      Closes #75196
      308fc232
    • T
      re-export SwitchIntEdgeEffects · 6bbf1e7a
      Tomasz Miąsko 提交于
      This makes it possible to use `switch_int_edge_effects` outside
      `rustc_mir::dataflow::impls`.
      6bbf1e7a
    • B
      Auto merge of #86255 - Smittyvb:mir-alloc-oom, r=RalfJung,oli-obk · 39e20f1a
      bors 提交于
      Support allocation failures when interpreting MIR
      
      This closes #79601 by handling the case where memory allocation fails during MIR interpretation, and translates that failure into an `InterpError`. The error message is "tried to allocate more memory than available to compiler" to make it clear that the memory shortage is happening at compile-time by the compiler itself, and that it is not a runtime issue.
      
      Now that memory allocation can fail, it would be neat if Miri could simulate low-memory devices to make it easy to see how much memory a Rust program needs.
      
      Note that this breaks Miri because it assumes that allocation can never fail.
      39e20f1a
    • B
      Auto merge of #86849 - jyn514:rustdoc-group, r=Manishearth · 64ae15dd
      bors 提交于
      Warn when `rustdoc::` group is omitted from lint names
      
      When rustdoc lints were first made a tool lint, they gave an unconditional warning when you used the original name:
      ```
      warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
        --> $DIR/renamed-lint-still-applies.rs:2:9
         |
      LL | #![deny(broken_intra_doc_links)]
         |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
         |
         = note: `#[warn(renamed_and_removed_lints)]` on by default
      ```
      That was reverted in https://github.com/rust-lang/rust/pull/83203 because adding `rustdoc::x` lints would cause the code to break on old versions of the compiler (due to https://github.com/rust-lang/rust/issues/66079#issuecomment-788589193, "fixed" in https://github.com/rust-lang/rust/pull/83216 in the sense that you can now opt-in to not breaking on nightly, which is not ideal but `register_tool` is a long way from stabilizing). Since https://github.com/rust-lang/rust/pull/80527 is now on 1.52.0 stable, we can re-enable the warning. For nightly users, they can change immediately and still have their code work on stable; for stable users, they can change their code in 12 weeks and still have it work up to 3 releases back (about 18 weeks). That seems reasonable to me.
      
      r? `@Manishearth` cc `@rust-lang/rustdoc`
      64ae15dd
    • Y
      Stabilize `string_drain_as_str` · ab86df0c
      Yuki Okushi 提交于
      ab86df0c