1. 11 7月, 2023 1 次提交
  2. 08 7月, 2023 1 次提交
  3. 06 7月, 2023 1 次提交
  4. 05 7月, 2023 1 次提交
  5. 30 6月, 2023 1 次提交
  6. 29 6月, 2023 1 次提交
    • N
      Avoid unnecessary line lookup. · 9db001df
      Nicholas Nethercote 提交于
      `lookup_debug_loc` calls `SourceMap::lookup_line`, which does a binary
      search over the files, and then a binary search over the lines within
      the found file. It then calls `SourceFile::line_begin_pos`, which redoes
      the binary search over the lines within the found file.
      
      This commit removes the second binary search over the lines, instead
      getting the line starting pos directly using the result of the first
      binary search over the lines.
      
      (And likewise for `get_span_loc`, in the cranelift backend.)
      9db001df
  7. 27 6月, 2023 1 次提交
  8. 20 6月, 2023 1 次提交
  9. 19 6月, 2023 2 次提交
  10. 18 6月, 2023 1 次提交
  11. 17 6月, 2023 1 次提交
  12. 16 6月, 2023 1 次提交
  13. 14 6月, 2023 1 次提交
    • B
      Auto merge of #112314 - ferrocene:pa-core-alloc-abort, r=bjorn3 · 2445d740
      bors 提交于
      Ignore `core`, `alloc` and `test` tests that require unwinding on `-C panic=abort`
      
      Some of the tests for `core` and `alloc` require unwinding through their use of `catch_unwind`. These tests fail when testing using `-C panic=abort` (in my case through a target without unwinding support, and `-Z panic-abort-tests`), while they should be ignored as they don't indicate a failure.
      
      This PR marks all of these tests with this attribute:
      
      ```rust
      #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
      ```
      
      I'm not aware of a way to test this on rust-lang/rust's CI, as we don't test any target with `-C panic=abort`, but I tested this locally on a Ferrocene target and it does indeed make the test suite pass.
      2445d740
  14. 13 6月, 2023 1 次提交
  15. 05 6月, 2023 1 次提交
  16. 03 6月, 2023 1 次提交
  17. 01 6月, 2023 2 次提交
  18. 30 5月, 2023 2 次提交
    • N
      Rollup merge of #112060 - lcnr:early-binder, r=jackh726 · 04dca8f1
      Nilstrieb 提交于
      `EarlyBinder::new` -> `EarlyBinder::bind`
      
      for consistency with `Binder::bind`. it may make sense to also add `EarlyBinder::dummy` in places where we know that no parameters exist, but I left that out of this PR.
      
      r? `@jackh726` `@kylematsuda`
      04dca8f1
    • M
      Rollup merge of #111827 - AngelicosPhosphoros:add_docs_to_cranelift, r=bjorn3 · a2a8589a
      Matthias Krüger 提交于
      Add build instructions for cranelift backend as part of Rust repo
      
      All other instructions assume that user works with separate repository than Rust compiler repository. When one follows default instructions, cranelift codegen tries to use different sys-root and compiler internal crates which leads to compiler errors when building it.
      
      I needed to do all this steps while adding new intrinsic to rustc.
      
      r? bjorn3
      a2a8589a
  19. 29 5月, 2023 2 次提交
  20. 27 5月, 2023 1 次提交
  21. 26 5月, 2023 5 次提交
    • M
      Rollup merge of #111950 - cjgillot:expn-noinline, r=oli-obk · 2f250c73
      Michael Goulet 提交于
      Remove ExpnKind::Inlined.
      
      Suggested in https://github.com/rust-lang/rust/pull/111815#issuecomment-1561903339
      
      r? ``@oli-obk``
      2f250c73
    • A
      Added build instructions for cranelift backend as part of Rust repo · 8aa3eba5
      AngelicosPhosphoros 提交于
      All other instructions assume that user works with separate repository than Rust compiler repository. When one follows default instructions, cranelift codegen tries to use different sys-root and compiler internal crates which leads to compiler errors when building it.
      
      I needed to do all this steps while adding new intrinsic to rustc.
      8aa3eba5
    • C
      Remove DesugaringKind::Replace. · 03f275bc
      Camille GILLOT 提交于
      03f275bc
    • B
      Auto merge of #86844 - bjorn3:global_alloc_improvements, r=pnkfelix · e6d1a0ed
      bors 提交于
      Support #[global_allocator] without the allocator shim
      
      This makes it possible to use liballoc/libstd in combination with `--emit obj` if you use `#[global_allocator]`. This is what rust-for-linux uses right now and systemd may use in the future. Currently they have to depend on the exact implementation of the allocator shim to create one themself as `--emit obj` doesn't create an allocator shim.
      
      Note that currently the allocator shim also defines the oom error handler, which is normally required too. Once `#![feature(default_alloc_error_handler)]` becomes the only option, this can be avoided. In addition when using only fallible allocator methods and either `--cfg no_global_oom_handling` for liballoc (like rust-for-linux) or `--gc-sections` no references to the oom error handler will exist.
      
      To avoid this feature being insta-stable, you will have to define `__rust_no_alloc_shim_is_unstable` to avoid linker errors.
      
      (Labeling this with both T-compiler and T-lang as it originally involved both an implementation detail and had an insta-stable user facing change. As noted above, the `__rust_no_alloc_shim_is_unstable` symbol requirement should prevent unintended dependence on this unstable feature.)
      e6d1a0ed
    • C
      Remove ExpnKind::Inlined. · f9dabd8b
      Camille GILLOT 提交于
      f9dabd8b
  22. 24 5月, 2023 1 次提交
  23. 18 5月, 2023 1 次提交
  24. 17 5月, 2023 1 次提交
    • N
      Remove `LangItems::require` · 74ab27c2
      Nilstrieb 提交于
      It's just a short wrapper used by `tcx.require_lang_item`. Deleting it
      gives us a negative diff.
      74ab27c2
  25. 16 5月, 2023 1 次提交
    • N
      Avoid `&format("...")` calls in error message code. · 8a9b38fd
      Nicholas Nethercote 提交于
      Error message all end up passing into a function as an `impl
      Into<{D,Subd}iagnosticMessage>`. If an error message is creatd as
      `&format("...")` that means we allocate a string (in the `format!`
      call), then take a reference, and then clone (allocating again) the
      reference to produce the `{D,Subd}iagnosticMessage`, which is silly.
      
      This commit removes the leading `&` from a lot of these cases. This
      means the original `String` is moved into the
      `{D,Subd}iagnosticMessage`, avoiding the double allocations. This
      requires changing some function argument types from `&str` to `String`
      (when all arguments are `String`) or `impl
      Into<{D,Subd}iagnosticMessage>` (when some arguments are `String` and
      some are `&str`).
      8a9b38fd
  26. 11 5月, 2023 4 次提交
  27. 07 5月, 2023 1 次提交
  28. 03 5月, 2023 1 次提交
    • N
      Restrict `From<S>` for `{D,Subd}iagnosticMessage`. · a4c49374
      Nicholas Nethercote 提交于
      Currently a `{D,Subd}iagnosticMessage` can be created from any type that
      impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static,
      str>`, which are reasonable. It also includes `&String`, which is pretty
      weird, and results in many places making unnecessary allocations for
      patterns like this:
      ```
      self.fatal(&format!(...))
      ```
      This creates a string with `format!`, takes a reference, passes the
      reference to `fatal`, which does an `into()`, which clones the
      reference, doing a second allocation. Two allocations for a single
      string, bleh.
      
      This commit changes the `From` impls so that you can only create a
      `{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static,
      str>`. This requires changing all the places that currently create one
      from a `&String`. Most of these are of the `&format!(...)` form
      described above; each one removes an unnecessary static `&`, plus an
      allocation when executed. There are also a few places where the existing
      use of `&String` was more reasonable; these now just use `clone()` at
      the call site.
      
      As well as making the code nicer and more efficient, this is a step
      towards possibly using `Cow<'static, str>` in
      `{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing
      the `From<&'a str>` impls to `From<&'static str>`, which is doable, but
      I'm not yet sure if it's worthwhile.
      a4c49374
  29. 02 5月, 2023 1 次提交