profile
viewpoint
Yuki Okushi JohnTitor Japan https://www.neet.club a.k.a. huyuumi | FLOSS nerd, Time traveler | community and crates.io @rust-lang, mods and i18n @nodejs, lead @actix, etc.

actix/actix-extras 84

A collection of additional crates supporting the actix and actix-web frameworks.

actix/actix-web-httpauth 78

HTTP authorization extractors for actix-web

JohnTitor/actions-mdbook 2

[WIP] Wraps the mdbook to enable common mdbook commands

huyuumi-sandbox/tarot 0

Simple Tarot

startedrust-analyzer/ungrammar

started time in 2 hours

delete branch JohnTitor/rust

delete branch : rollup-z9djftk

delete time in 2 hours

PR opened rust-lang/rust

Add regression test for issue-66768

Fixes #66768

This is fixed by #70452 (in particular, https://github.com/rust-lang/rust/pull/70452/files#diff-53aef089a36a8e2ed07627fc8915fe63R1763) and I'm not sure it's worth to add this test (i.e. the tests in #70452 are enough), so r? @eddyb to confirm it.

+205 -0

0 comment

1 changed file

pr created time in 3 hours

create barnchJohnTitor/rust

branch : broken-mir-test

created branch time in 3 hours

issue commentrust-lang/rust

nalgebra NoSolution Broken MIR ICE

Thanks @steffahn!

So, this part fixes the issue, I believe: https://github.com/rust-lang/rust/pull/70452/files#diff-53aef089a36a8e2ed07627fc8915fe63R1763

Andlon

comment created time in 3 hours

push eventJohnTitor/rust

Tim Diekmann

commit sha 076ef66ba2f647a627806f376c23b332fb04d3ff

Remove in-place allocation and revert to separate methods for zeroed allocations Fix docs

view details

Tim Diekmann

commit sha b01fbc437eae177cd02e7798f2f1454c1c6ed6e5

Simplify implementations of `AllocRef` for `Global` and `System`

view details

Tim Diekmann

commit sha 9cd9286e20e6fe4cdb7e298fa5ec966eb26fa32b

Update doc-comment for grow_zeroed

view details

Tim Diekmann

commit sha db7d07b83bee302be977468caa6931f651b4f77a

Remove a trailing whitespace

view details

Tim Diekmann

commit sha 24ddf76ed7bc453826e6e843cd0ca289e02185f1

Merge branch 'master' into remove-in-place-alloc

view details

Tim Diekmann

commit sha 6395659168a760b31365e925dc5be5a201ac10ae

Apply suggestions from code review Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>

view details

Bastian Kauschke

commit sha 06dbd06e4deab2255d310d38ed0ea28becf43664

forbid `#[track_caller]` on main

view details

Nicholas Nethercote

commit sha eeb4b83289e09956e0dda174047729ca87c709fe

Remove two fields from `SubstFolder`. They're only used in error messages printed if there's an internal compiler error, and the cost of maintaining them is high enough to show up in profiles.

view details

Yuki Okushi

commit sha cd7204ef394d1e53bb967086186e9b8664d7e268

Forbid non-derefable types explicitly in unsizing casts

view details

Pietro Albini

commit sha 268bc7fa2f8e09e371c6deb71eb9397700cb5342

ci: disable fail-fast on auto-fallible The purpose of the auto-fallible job is to run builders that are likely to fail on CI without gating on them. Having fail-fast enabled there kinda defeats the purpose, as if one of them fails we can't monitor the outcome of the other ones. This was prompted by the aarch64-gnu builder consistently failing due to a broken test, preventing us from seeing if the macOS spurious failure is fixed.

view details

bors

commit sha c9b80bb3ff194d488fdd95da2ef23bd466f921cb

Auto merge of #75095 - pietroalbini:fallible-fast-fail, r=Mark-Simulacrum ci: disable fast-fail on auto-fallible The purpose of the auto-fallible job is to run builders that are likely to fail on CI without gating on them. Having fast-fail enabled there kinda defeats the purpose, as if one of them fails we can't monitor the outcome of the other ones. This was prompted by the aarch64-gnu builder consistently failing due to a broken test, preventing us from seeing if the macOS spurious failure is fixed. r? @Mark-Simulacrum

view details

bors

commit sha 5f6bd6ec0ac422991b89bb8643eaa5d9d46eed11

Auto merge of #74850 - TimDiekmann:remove-in-place-alloc, r=Amanieu Remove in-place allocation and revert to separate methods for zeroed allocations closes rust-lang/wg-allocators#58

view details

bors

commit sha d08eb98698cbce56e599324fb83d55eef2cac408

Auto merge of #75133 - nnethercote:rm-SubstFolder-fields, r=matthewjasper Remove two fields from `SubstFolder`. They're only used in error messages printed if there's an internal compiler error, and the cost of maintaining them is high enough to show up in profiles. r? @matthewjasper

view details

Bastian Kauschke

commit sha 9127e27cec22cb130d0a96094196995d72b19030

tweak error message

view details

bors

commit sha f9d422ea78a4652c5d9ecd6b6d7577bdfbfd98a8

Auto merge of #75136 - JohnTitor:unsizing-casts-non-null, r=oli-obk Forbid non-derefable types explicitly in unsizing casts Fixes #75118 r? @oli-obk

view details

Dan Gohman

commit sha 1a3e4d81406c700d90d6d482163b60c5efc18505

Remove the `--no-threads` workaround for wasm targets. Remove `--no-threads` from the wasm-ld command-line, which was a workaround for [an old bug] which was fixed in LLVM 9.0, and is no longer needed. Also, the `--no-threads` option has been [removed upstream]. [an old bug]: https://bugs.llvm.org/show_bug.cgi?id=41508 [removed upstream]: https://reviews.llvm.org/D76885

view details

bors

commit sha 07f1fdecfed85fe4be14b293eb913560a6cd60ba

Auto merge of #75161 - sunfishcode:wasm-no-threads, r=alexcrichton Remove the `--no-threads` workaround for wasm targets. Remove `--no-threads` from the wasm-ld command-line, which was a workaround for [an old bug] which was fixed in LLVM 9.0, and is no longer needed. Also, the `--no-threads` option has been [removed upstream]. [an old bug]: https://bugs.llvm.org/show_bug.cgi?id=41508 [removed upstream]: https://reviews.llvm.org/D76885 r? @alexcrichton

view details

bors

commit sha 32d14eba47ee8bb0b5edb04bcf652517f81c4cf5

Auto merge of #75130 - lcnr:array_chunks, r=ecstatic-morse forbid `#[track_caller]` on main fixes #75125 cc @anp

view details

push time in 3 hours

pull request commentrust-lang/crates.io

categories: Add os::linux-apis

@woodruffw Thanks! But could you show more examples? I think it'd be ideal that there were 10 or so examples. Because we're reluctant to add new (sub)categories and need the reason that "we definitely should add this category!".

woodruffw

comment created time in 3 hours

issue commentrust-lang/rust

nalgebra NoSolution Broken MIR ICE

I cannot reproduce the ICE with https://github.com/Andlon/ice_testcase or https://github.com/rust-lang/rust/issues/66768#issuecomment-568478614 since 1.44.0, it compiles fine instead. Note that we have to tweak the dependencies of ice_testcase like:

--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,8 +4,8 @@ version = "0.1.0"
 edition = "2018"

 [dependencies.nalgebra]
-git = "https://github.com/rustsim/nalgebra.git"
-rev = "31ef5f0ab02c6ecf279867f07cd63e16cece8b75"
+git = "https://github.com/daingun/nalgebra.git"
+branch = "patch-2"
 default-features = false
 features = ["serde-serialize", "default"]

Otherwise, cargo cannot resolve the deps.

I'm going to mark this as E-needs-test since we could say it's now fixed, even though we didn't bisect.

Andlon

comment created time in 4 hours

pull request commentrust-lang/rust

Use min_specialization in libcore

Let's r? @nagisa as they left some review comments.

matthewjasper

comment created time in 5 hours

pull request commentrust-lang/rust

Rollup of 5 pull requests

@rustbot modify labels: +rollup @bors r+ rollup=never p=5

JohnTitor

comment created time in 5 hours

PR opened rust-lang/rust

Rollup of 5 pull requests

Successful merges:

  • #75139 (Remove log alias from librustdoc)
  • #75140 (Clean up E0745)
  • #75149 (Correct a typo in interpret/memory.rs)
  • #75152 (Replace Memoryblock with NonNull<[u8]>)
  • #75168 (Update books)

Failed merges:

r? @ghost

+148 -130

0 comment

24 changed files

pr created time in 5 hours

push eventJohnTitor/rust

Eric Huss

commit sha 583133308ba82f4140c3d8b80ead7766d0f86906

Update books

view details

Yuki Okushi

commit sha 324faf1aacddb9197ea9c1e2296c7102a069513c

Rollup merge of #75168 - ehuss:update-books, r=ehuss Update books ## reference 7 commits in b329ce37424874ad4db94f829a55807c6e21d2cb..c9b2736a059469043177e1e4ed41a55d7c63ac28 2020-07-20 08:54:08 -0700 to 2020-08-03 03:34:03 -0700 - Fix documented build output path. (rust-lang-nursery/reference#870) - Update token usage table. (rust-lang-nursery/reference#868) - Allow trait inner attributes (rust-lang-nursery/reference#864) - patterns.md - add word "underscore" to _ paragraph (rust-lang-nursery/reference#865) - Drive-by mention unsafe fn closure coercion (rust-lang-nursery/reference#802) - grammar: Change "For awhile" to "For a while" (rust-lang-nursery/reference#857) - Added Unpin to list of Auto Traits (rust-lang-nursery/reference#854) ## book 7 commits in a914f2c7e5cdb771fa465de142381a51c53b580e..363293c1c5ce9e84ea3935a5e29ce8624801208a 2020-07-21 09:20:05 -0500 to 2020-08-03 15:56:30 -0500 - replace commas with m-dashes to improve readability of chapter 4.1 (rust-lang/book#2419) - Update TOML link to official website (rust-lang/book#2411) - Add github repo link (rust-lang/book#2265) - Remove the version number entirely so we can stop updating it - Add link to the `Vec&lt;T&gt;` API documentation (rust-lang/book#2249) - link to stdlib atomic docs (rust-lang/book#2361) - mdbook version used is now 0.4.x (rust-lang/book#2410) ## rust-by-example 1 commits in 229c6945a26a53a751ffa4f9cb418388c00029d3..2e9271981adc32613365810f3428334c07095215 2020-07-06 10:13:15 -0300 to 2020-07-27 13:39:16 -0500 - Replaced "princess" with "royal" (rust-lang/rust-by-example#1363) ## embedded-book 1 commits in 94d9ea8460bcbbbfef1877b47cb930260b5849a7..b5256448a2a4c1bec68b93c0847066f92f2ff5a9 2020-07-05 14:17:40 +0000 to 2020-07-24 23:09:29 +0000 - Update c-with-rust.md (rust-embedded/book#256)

view details

push time in 5 hours

push eventJohnTitor/rust

Tim Diekmann

commit sha ab9362ad9a9b4b93951ccb577224dda367923226

Replace `Memoryblock` with `NonNull<[u8]>`

view details

Tim Diekmann

commit sha 929e37d4bfb2d6c99094a8a89c5feda47d25bbbe

Revert renaming of "memory block"

view details

Tim Diekmann

commit sha 93d98328d161bcdf002f9d2f7f916f01c6fce3b1

Revert missing "memory block"

view details

Yuki Okushi

commit sha 5f87ee0ab1bcbf708d27e928296cb44ce9ba9c5f

Rollup merge of #75152 - TimDiekmann:replace_memblock, r=Amanieu Replace `Memoryblock` with `NonNull<[u8]>` Closes rust-lang/wg-allocators#61 r? @Amanieu

view details

push time in 5 hours

push eventJohnTitor/rust

Felix Yan

commit sha 6d75d7c0843dc0f2b64b4427e3290222ef558227

Correct a typo in interpret/memory.rs

view details

Yuki Okushi

commit sha 7123daff5359dc3ebabcf4d1e00b085c27455877

Rollup merge of #75149 - felixonmars:patch-1, r=wesleywiser Correct a typo in interpret/memory.rs

view details

push time in 5 hours

push eventJohnTitor/rust

Guillaume Gomez

commit sha 0275cd74096b71f6c641b06e73e6cb359303d6cc

Clean up E0745

view details

Yuki Okushi

commit sha 008228a708302d4dd8359dccee6a8a85fff3865e

Rollup merge of #75140 - GuillaumeGomez:cleanup-e0745, r=pickfire Clean up E0745 r? @Dylan-DPC

view details

push time in 5 hours

create barnchJohnTitor/rust

branch : rollup-z9djftk

created branch time in 5 hours

push eventJohnTitor/rust

Ivan Tham

commit sha c577d71e03cebb03d079670e8b9ce995fb79560b

Remove log alias from librustdoc

view details

Yuki Okushi

commit sha 7b39f75187f14a7d8b3735967499b457d85b17cb

Rollup merge of #75139 - pickfire:librustdoc-import, r=jyn514 Remove log alias from librustdoc r? @jyn514

view details

push time in 5 hours

issue commentrust-lang/rust

building on arm64 hardware under armv7 qemu emulation want to use wrong platform

This is related to ARM platforms. @rustbot ping arm

iav

comment created time in 5 hours

issue commentrust-lang/rust

[Nightly ICE] Deep in proc macro: panicked at 'empty field list in the map'

Let's get a MCVE and bisect the culprit PR. @rustbot ping cleanup

jhwgh1968

comment created time in 5 hours

issue commentrust-lang/rust

Compiling crate `fixed` for thumbv6m-none-eabi with opt-level=s spins endlessly in llvm::SelectionDAG::Combine

Let's ping relevant teams. @rustbot ping arm

myfreeweb

comment created time in 5 hours

issue commentrust-lang/rust

Rust 1.45.0 aarch64-apple-ios generates multiple messages: "'+cyclone' is not a recognized feature for this target (ignoring feature)"

Removing I-prioritize as this is waiting on backport (but it seems we missed it on 1.45.2?) and already fixed in beta and nightly (related discussion on the wg-prioritization).

trsoluti

comment created time in 6 hours

issue commentrust-lang/rust

Program crashes with #[track_caller] applied to main()

Assigning P-high as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

flowbish

comment created time in 6 hours

issue commentrust-lang/rust

WebAssembly size regression between 1.40 and 1.41

Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

RReverser

comment created time in 6 hours

push eventJohnTitor/blog_os

Yuki Okushi

commit sha bff9944b025fd44a31bb12699721e94bebaed986

Follow upstream changes

view details

Yuki Okushi

commit sha 3cdf51aaca8dfedb2eb487f94946d7a908779733

Fix minor issues

view details

push time in 6 hours

push eventJohnTitor/blog_os

Yuki Okushi

commit sha 57855e23cbada0e241670ce86d4e6934b4c0a3e9

Enable Japanese translation

view details

Yuki Okushi

commit sha 3650a48c51a0d2c45cc295ea5bcde8cd97f5f703

Add Japanese translation for second-edition/01

view details

Yuki Okushi

commit sha 969d46c166a1ddad380a8991273f9a803d0035a7

Follow upstream changes

view details

push time in 7 hours

delete branch actix/actix-net

delete branch : fix-msrv-ci

delete time in 7 hours

push eventactix/actix-net

Yuki Okushi

commit sha ed4b708c66c7032eeb0198ff81663df41e4d9406

Fix CI on MSRV check (#171)

view details

push time in 7 hours

PR merged actix/actix-net

Fix CI on MSRV check

For instance: https://github.com/actix/actix-net/runs/940187979

This is because we use 1.39.0 for installing cargo-cache, it should be resolved by using the latest stable instead.

+4 -2

1 comment

1 changed file

JohnTitor

pr closed time in 7 hours

push eventJohnTitor/blog-os-ja

Yuki Okushi

commit sha 5cba54c030010770f5545eb7b5d3d17db17c559b

Update README.md

view details

push time in 7 hours

push eventJohnTitor/blog-os-ja

Yuki Okushi

commit sha 78d867727c64facc6893280596b805bfe53f53bf

Update README.md

view details

push time in 7 hours

pull request commentrust-lang/rust

Rollup of 10 pull requests

@ssomers Thanks for investigating it!

@Mark-Simulacrum Is it worth to revert it and check perf run?

JohnTitor

comment created time in 7 hours

pull request commentphil-opp/blog_os

Add (initial) Japanese translation

Okay, this is now ready to review :) cc @phil-opp

JohnTitor

comment created time in 8 hours

push eventJohnTitor/blog_os

Yuki Okushi

commit sha cefb00c37ca99f4b76b8d48889bd901fabb7d791

Follow upstream changes

view details

push time in 8 hours

pull request commentphil-opp/blog_os

Add (initial) Japanese translation

Oh, we should update the entry anyway, one sec...

JohnTitor

comment created time in 8 hours

PR opened phil-opp/blog_os

Add (initial) Japanese translation

This is the first step for adding the Japanese translations. The first post translation is taken from https://github.com/JohnTitor/blog-os-ja/blob/master/src/01-freestanding-rust-binary.md. The commit hash is old a bit but should be followed-up later easily.

+530 -0

0 comment

2 changed files

pr created time in 8 hours

create barnchJohnTitor/blog_os

branch : add-japanese

created branch time in 8 hours

push eventactix/actix-net

Yuki Okushi

commit sha d692ffd3e443992fa09c1e238627e5a417bd0690

Fix CI on MSRV check

view details

push time in 8 hours

push eventJohnTitor/blog_os

Yuki Okushi

commit sha 62337472990b019ba71dcfffb2093c9bc8ffbbdc

Fix link in build-on-android (#842)

view details

Roberto Wesley Overdijk

commit sha 3c070c6dc0917ab680b4ed6fe8d0d001559f0899

change rustup override add to rustup override set (#843)

view details

Philipp Oppermann

commit sha 277368537bf9a79f01cd9e6bf76fd3b01002d061

Fix dead link

view details

push time in 8 hours

PR opened actix/actix-net

Fix CI on MSRV check

For instance: https://github.com/actix/actix-net/runs/940187979

This is because we use 1.39.0 for installing cargo-cache, it should be resolved by using the latest stable instead.

+3 -2

0 comment

1 changed file

pr created time in 8 hours

create barnchactix/actix-net

branch : fix-msrv-ci

created branch time in 8 hours

push eventJohnTitor/actix-net

Yuki Okushi

commit sha 235a76dcd471dba6854ebe5929ff72c85c378f6e

GHA: Switch action to the official setup-msys2 (#169)

view details

push time in 8 hours

pull request commentrust-lang/rust

Remove log alias from librustdoc

Hm yeah, and seems spurious, let's retry. @bors retry

pickfire

comment created time in 8 hours

pull request commentrust-lang/rust

Replace `Memoryblock` with `NonNull<[u8]>`

The failure is spurious: rust-lang/cargo#8517 @bors retry

TimDiekmann

comment created time in 9 hours

pull request commentrust-lang/rust

forbid `#[track_caller]` on main

The failure is spurious: https://github.com/rust-lang/cargo/issues/8517 @bors retry

lcnr

comment created time in 9 hours

Pull request review commentrust-lang/rust

`#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi

 pub unsafe fn file_readdir(     cookie_: dircookie,     bufused_: &mut usize, ) -> errno {-    cloudabi_sys_file_readdir(fd_, buf_.as_mut_ptr() as *mut (), buf_.len(), cookie_, bufused_)+    unsafe fn cloudabi_sys_file_readdir(fd_, buf_.as_mut_ptr() as *mut (), buf_.len(), cookie_, bufused_) }
    unsafe { cloudabi_sys_file_readdir(fd_, buf_.as_mut_ptr() as *mut (), buf_.len(), cookie_, bufused_) }
chansuke

comment created time in 9 hours

issue closedrust-lang/rust

Improve diagnostics for an invalid binding in a tuple struct pattern

This PR can be merged as is, but I think we could also add another branch that detects the case with PatKind::Ident(..) where .. is present and record it with a PartialRes::new(Res::Err), which should eliminate the second unnecessary error that complains about x not being defined. (Haven't looked at this deeply enough to be sure.)

Originally posted by @estebank in https://github.com/rust-lang/rust/pull/74557#discussion_r457614002

Follow-up of #74557

closed time in 9 hours

JohnTitor

issue commentrust-lang/rust

Improve diagnostics for an invalid binding in a tuple struct pattern

I'm going to close this issue as the above PR was reverted. @estebank If you have any ideas for improving the diagnostics introduced by #74963, I'm happy to see another issue pointing it out <3

JohnTitor

comment created time in 9 hours

issue closedrust-lang/rust

ICE with the `@ ..` binding pattern

<!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples.

http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/

-->

Code

pub enum Operands {
	Zero,
	One(u8),
	Two(u8, u8),
}

pub fn main() {
	use Operands::*;

	let operands = Zero;

	match operands {
		Zero => println!("Nothing"),
		One(operand) => println!("{:x}", operand),
		Two(operands @ ..) => println!("({:x}, {:x})", operands.0, operands.1),
	};
}

Meta

<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. -->

The bug exists in the beta,

rustup run beta rustc --version --verbose

rustc 1.46.0-beta.1 (e51b714db 2020-07-15)
binary: rustc
commit-hash: e51b714db8ff82ac38ea7c6742d6f5480e2e77bd
commit-date: 2020-07-15
host: x86_64-unknown-linux-gnu
release: 1.46.0-beta.1
LLVM version: 10.0

nightly,

rustup run nightly rustc --version --verbose

rustc 1.46.0-nightly (346aec9b0 2020-07-11)
binary: rustc
commit-hash: 346aec9b02f3c74f3fce97fd6bda24709d220e49
commit-date: 2020-07-11
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0

and stable build channels.

rustc --version --verbose:

rustc 1.45.0 (5c1f21c3b 2020-07-13)
binary: rustc
commit-hash: 5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2
commit-date: 2020-07-13
host: x86_64-unknown-linux-gnu
release: 1.45.0
LLVM version: 10.0

The error and the backtrace provided are produced by the stable build.

Error output

error: `operands @` is not allowed in a tuple struct
  --> ./a.rs:15:7
   |
15 |         Two(operands @ ..) => println!("({:x}, {:x})", operands.0, operands.1),
   |             ^^^^^^^^^^^^^ this is only allowed in slice patterns
   |
   = help: remove this and bind each tuple field independently
help: if you don't need to use the contents of operands, discard the tuple's remaining fields
   |
15 |         Two(..) => println!("({:x}, {:x})", operands.0, operands.1),
   |             ^^

error: internal compiler error: src/librustc_typeck/check/mod.rs:3023: no type for local variable unknown node (hir_id=HirId { owner: DefId(0:13 ~ a[317d]::main[0]), local_id: 9 })
  --> ./a.rs:15:50
   |
15 |         Two(operands @ ..) => println!("({:x}, {:x})", operands.0, operands.1),
   |                                                        ^^^^^^^^

thread 'rustc' panicked at 'Box<Any>', /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/libstd/macros.rs:13:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

<!-- Include a backtrace in the code block by setting RUST_BACKTRACE=1 in your environment. E.g. RUST_BACKTRACE=1 cargo build. --> <details><summary><strong>Backtrace</strong></summary> <p>

thread 'rustc' panicked at 'Box<Any>', /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/libstd/macros.rs:13:23
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:490
  12: std::panicking::begin_panic
  13: rustc_errors::HandlerInner::span_bug
  14: rustc_errors::Handler::span_bug
  15: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
  16: rustc_middle::ty::context::tls::with_opt::{{closure}}
  17: rustc_middle::ty::context::tls::with_opt
  18: rustc_middle::util::bug::opt_span_bug_fmt
  19: rustc_middle::util::bug::span_bug_fmt
  20: rustc_typeck::check::FnCtxt::local_ty::{{closure}}
  21: rustc_typeck::check::FnCtxt::local_ty
  22: rustc_typeck::check::FnCtxt::instantiate_value_path
  23: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  24: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  25: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  26: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  27: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  28: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  29: <smallvec::SmallVec<A> as core::iter::traits::collect::Extend<<A as smallvec::Array>::Item>>::extend
  30: <T as rustc_middle::ty::context::InternIteratorElement<T,R>>::intern_with
  31: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  32: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  33: rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match
  34: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  35: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  36: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  37: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  38: rustc_typeck::check::FnCtxt::check_argument_types
  39: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  40: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  41: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  42: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  43: rustc_typeck::check::FnCtxt::check_argument_types
  44: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  45: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  46: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  47: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  48: rustc_typeck::check::FnCtxt::check_stmt
  49: rustc_typeck::check::FnCtxt::check_block_with_expected
  50: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  51: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  52: rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match
  53: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  54: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  55: rustc_typeck::check::FnCtxt::check_stmt
  56: rustc_typeck::check::FnCtxt::check_block_with_expected
  57: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  58: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  59: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  60: rustc_typeck::check::check_fn
  61: rustc_middle::ty::context::GlobalCtxt::enter_local
  62: rustc_typeck::check::typeck_tables_of
  63: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_tables_of>::compute
  64: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  65: rustc_query_system::query::plumbing::get_query_impl
  66: rustc_query_system::query::plumbing::ensure_query_impl
  67: rustc_typeck::check::typeck_item_bodies
  68: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_item_bodies>::compute
  69: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  70: rustc_query_system::query::plumbing::get_query_impl
  71: rustc_typeck::check_crate
  72: rustc_interface::passes::analysis
  73: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  74: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  75: rustc_query_system::query::plumbing::get_query_impl
  76: rustc_middle::ty::context::tls::enter_global
  77: rustc_interface::interface::run_compiler_in_existing_thread_pool
  78: rustc_ast::attr::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

</p> </details>

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START --> This issue has been assigned to @jakubadamw via this comment. <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"jakubadamw"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->

closed time in 9 hours

r1fl

issue commentrust-lang/rust

ICE with the `@ ..` binding pattern

We don't backport the fix in favor of this comment: https://github.com/rust-lang/rust/pull/74557#issuecomment-668660597 So I'm just going to close this as fixed.

r1fl

comment created time in 9 hours

issue closedrust-lang/rust

Pattern matching regression 1.45.0 -> 1.45.1 (+nightly)

<!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. -->

I tried this code:

fn main() {
    if let Some([b'@', filename @ ..]) = Some(b"@abc123") {
        println!("filename {:?}", filename);
    }
}

I expected this to compile and print

filename [97, 98, 99, 49, 50, 51]

which it does with 1.45.0

Instead, it failed to compile on both 1.45.1 and nightly:

error[E0425]: cannot find value `filename` in this scope
 --> src/main.rs:3:35
  |
3 |         println!("filename {:?}", filename);
  |                                   ^^^^^^^^ not found in this scope

error: aborting due to previous error

Playground link

Meta

<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. -->

rustc --version --verbose:

rustc 1.45.1 (c367798cf 2020-07-26)
binary: rustc
commit-hash: c367798cfd3817ca6ae908ce675d1d99242af148
commit-date: 2020-07-26
host: x86_64-unknown-linux-gnu
release: 1.45.1
LLVM version: 10.0

</p> </details>

closed time in 9 hours

jsgf

issue commentrust-lang/rust

Pattern matching regression 1.45.0 -> 1.45.1 (+nightly)

So, the failure has been "fixed" in the both versions, I'm going to close this. If I have missed something, please re-open it :)

jsgf

comment created time in 9 hours

pull request commentrust-lang/rust

Forbid non-derefable types explicitly in unsizing casts

Beta-nominating with this reason: https://github.com/rust-lang/rust/pull/75136#issuecomment-668774651

JohnTitor

comment created time in 9 hours

delete branch JohnTitor/rust

delete branch : unsizing-casts-non-null

delete time in 10 hours

issue closedactix/actix-web

actix-web losing race - see benchmarks, I also wonder if actix-web will be actively maintained or not?

Check out the latest preliminary results here: https://www.techempower.com/benchmarks/#section=test&runid=a21aa293-2b08-45bd-b997-b1d397024b51&hw=ph&test=fortune&a=2

I am pointing to ntex-db. Github repository: https://github.com/ntex-rs/ntex

closed time in 10 hours

shujaatak

issue commentactix/actix-web

actix-web losing race - see benchmarks, I also wonder if actix-web will be actively maintained or not?

I don't think we should put this topic on the issue tracker, what's the action we can take here? Actually, we (the actix community) are leaning toward safety rather than fast. And ntex is Nikolay's personal project. Now, we could say actix is passively-maintained but we're happy to see any PRs and review them, of course.

shujaatak

comment created time in 10 hours

pull request commentrust-lang/libc

Add DevkitPPC support

The changes look good to me. Does this work fine on your environment? If so, r=me once the commits are squashed.

DarkKirb

comment created time in 10 hours

pull request commentrust-lang/rust

Clean up E0745

The log says:

2020-08-04T17:05:35.4404917Z Caused by:
2020-08-04T17:05:35.4405087Z   error inflating zlib stream; class=Zlib (5)
2020-08-04T17:05:35.4484019Z failed to run: D:\a\rust\rust\build\i686-pc-windows-msvc\stage0\bin\cargo.exe build --manifest-path D:\a\rust\rust\src/bootstrap/Cargo.toml --locked
2020-08-04T17:05:35.4485235Z Build completed unsuccessfully in 0:00:23
2020-08-04T17:05:35.4598968Z make: *** [Makefile:60: prepare] Error 1
2020-08-04T17:05:39.4794868Z Command failed. Attempt 5/5:
2020-08-04T17:05:39.8494605Z     Updating crates.io index
2020-08-04T17:06:02.8103572Z error: failed to get `cc` as a dependency of package `bootstrap v0.0.0 (D:\a\rust\rust\src\bootstrap)`
2020-08-04T17:06:02.8104465Z 
2020-08-04T17:06:02.8105895Z Caused by:
2020-08-04T17:06:02.8106804Z   failed to fetch `https://github.com/rust-lang/crates.io-index`
2020-08-04T17:06:02.8106980Z 
2020-08-04T17:06:02.8107125Z Caused by:
2020-08-04T17:06:02.8107525Z   error inflating zlib stream; class=Zlib (5)
2020-08-04T17:06:02.8187166Z failed to run: D:\a\rust\rust\build\i686-pc-windows-msvc\stage0\bin\cargo.exe build --manifest-path D:\a\rust\rust\src/bootstrap/Cargo.toml --locked
2020-08-04T17:06:02.8187828Z Build completed unsuccessfully in 0:00:23
2020-08-04T17:06:02.8298322Z make: *** [Makefile:60: prepare] Error 1
2020-08-04T17:06:02.8307850Z The command has failed after 5 attempts.

It's spurious, @bors retry

GuillaumeGomez

comment created time in 11 hours

Pull request review commentrust-lang/rust

Fix the documentation for move about Fn traits implementations

 mod mod_keyword {} /// Capture a [closure]'s environment by value. /// /// `move` converts any variables captured by reference or mutable reference-/// to owned by value variables. The three [`Fn` trait]'s mirror the ways to capture-/// variables, when `move` is used, the closures is represented by the `FnOnce` trait.+/// to owned by value variables.+///+/// Note: `move` closures may still implement [`Fn`] or [`FnMut`], even though+/// they capture variables by move. This is because the traits implemented by a
/// they capture variables by `move`. This is because the traits implemented by a
poliorcetics

comment created time in 11 hours

pull request commentrust-lang/libc

Android: Add preadv and friends.

Sorry, I was away for a bit and now can't see the CI results. How do I get it to re-run?

No worries! I also doesn't have the permission to re-run on Pipelines and usually close/re-open PRs to do it.

qwandor-google

comment created time in 11 hours

PullRequestEvent

PR closed rust-lang/libc

Android: Add preadv and friends.

From sys/uio.h. Note that preadv64/pwritev64 are already included in src/unix/linux_like/mod.rs.

+28 -0

2 comments

1 changed file

qwandor-google

pr closed time in 11 hours

push eventrust-lang/libc

coolreader18

commit sha ec5c0ae6bc00ff9f67a0ba44bd2d3cc355dd3fae

Add more constants for getnameinfo

view details

Yuki Okushi

commit sha 510badd75fa5e324a7a0c85aa48baabe84fb1773

Merge pull request #1853 from coolreader18/nameinfo-consts Add more constants for getnameinfo on android

view details

push time in 11 hours

pull request commentrust-lang/rust

Forbid non-derefable types explicitly in unsizing casts

@oli-obk Could we beta-nominate this? The failure has reached beta and this is an obvious fix.

JohnTitor

comment created time in 12 hours

pull request commentrust-lang/rust

Forbid non-derefable types explicitly in unsizing casts

Seems spurious:

2020-08-04T13:24:52.4138230Z Cloning into '/Users/runner/work/rust/rust/src/tools/rls'...
2020-08-04T13:24:52.5558570Z fatal: unable to access 'https://github.com/rust-lang/rls.git/': transfer closed with outstanding read data remaining
2020-08-04T13:24:52.5600530Z fatal: clone of 'https://github.com/rust-lang/rls.git' into submodule path '/Users/runner/work/rust/rust/src/tools/rls' failed
2020-08-04T13:24:52.5608690Z Failed to clone 'src/tools/rls'. Retry scheduled
2020-08-04T13:24:52.7158790Z Cloning into '/Users/runner/work/rust/rust/src/tools/rls'...
2020-08-04T13:24:52.7179710Z fatal: unable to access 'https://github.com/rust-lang/rls.git/': transfer closed with outstanding read data remaining
2020-08-04T13:24:52.7180500Z The command has failed after 5 attempts.
2020-08-04T13:24:52.7184470Z fatal: clone of 'https://github.com/rust-lang/rls.git' into submodule path '/Users/runner/work/rust/rust/src/tools/rls' failed
2020-08-04T13:24:52.7185190Z Failed to clone 'src/tools/rls' a second time, aborting
2020-08-04T13:24:52.7185720Z + [[ 5 -lt 5 ]]
2020-08-04T13:24:52.7186320Z + echo 'The command has failed after 5 attempts.'
2020-08-04T13:24:52.7186540Z + return 1
2020-08-04T13:24:57.7345840Z ##[error]Process completed with exit code 1.

@bors retry

JohnTitor

comment created time in 13 hours

PR opened rust-lang/rust

Forbid non-derefable types explicitly in unsizing casts

Fixes #75118 r? @oli-obk

+31 -1

0 comment

3 changed files

pr created time in a day

create barnchJohnTitor/rust

branch : unsizing-casts-non-null

created branch time in a day

push eventJohnTitor/rust

Alex Crichton

commit sha 2c1b0467e02a763a61335b8acb3c29524bcb9e6d

rustc: Improving safe wasm float->int casts This commit improves code generation for WebAssembly targets when translating floating to integer casts. This improvement is only relevant when the `nontrapping-fptoint` feature is not enabled, but the feature is not enabled by default right now. Additionally this improvement only affects safe casts since unchecked casts were improved in #74659. Some more background for this issue is present on #73591, but the general gist of the issue is that in LLVM the `fptosi` and `fptoui` instructions are defined to return an `undef` value if they execute on out-of-bounds values; they notably do not trap. To implement these instructions for WebAssembly the LLVM backend must therefore generate quite a few instructions before executing `i32.trunc_f32_s` (for example) because this WebAssembly instruction traps on out-of-bounds values. This codegen into wasm instructions happens very late in the code generator, so what ends up happening is that rustc inserts its own codegen to implement Rust's saturating semantics, and then LLVM also inserts its own codegen to make sure that the `fptosi` instruction doesn't trap. Overall this means that a function like this: #[no_mangle] pub unsafe extern "C" fn cast(x: f64) -> u32 { x as u32 } will generate this WebAssembly today: (func $cast (type 0) (param f64) (result i32) (local i32 i32) local.get 0 f64.const 0x1.fffffffep+31 (;=4.29497e+09;) f64.gt local.set 1 block ;; label = @1 block ;; label = @2 local.get 0 f64.const 0x0p+0 (;=0;) local.get 0 f64.const 0x0p+0 (;=0;) f64.gt select local.tee 0 f64.const 0x1p+32 (;=4.29497e+09;) f64.lt local.get 0 f64.const 0x0p+0 (;=0;) f64.ge i32.and i32.eqz br_if 0 (;@2;) local.get 0 i32.trunc_f64_u local.set 2 br 1 (;@1;) end i32.const 0 local.set 2 end i32.const -1 local.get 2 local.get 1 select) This PR improves the situation by updating the code generation for float-to-int conversions in rustc, specifically only for WebAssembly targets and only for some situations (float-to-u8 still has not great codegen). The fix here is to use basic blocks and control flow to avoid speculatively executing `fptosi`, and instead LLVM's raw intrinsic for the WebAssembly instruction is used instead. This effectively extends the support added in #74659 to checked casts. After this commit the codegen for the above Rust function looks like: (func $cast (type 0) (param f64) (result i32) (local i32) block ;; label = @1 local.get 0 f64.const 0x0p+0 (;=0;) f64.ge local.tee 1 i32.const 1 i32.xor br_if 0 (;@1;) local.get 0 f64.const 0x1.fffffffep+31 (;=4.29497e+09;) f64.le i32.eqz br_if 0 (;@1;) local.get 0 i32.trunc_f64_u return end i32.const -1 i32.const 0 local.get 1 select) For reference, in Rust 1.44, which did not have saturating float-to-integer casts, the codegen LLVM would emit is: (func $cast (type 0) (param f64) (result i32) block ;; label = @1 local.get 0 f64.const 0x1p+32 (;=4.29497e+09;) f64.lt local.get 0 f64.const 0x0p+0 (;=0;) f64.ge i32.and i32.eqz br_if 0 (;@1;) local.get 0 i32.trunc_f64_u return end i32.const 0) So we're relatively close to the original codegen, although it's slightly different because the semantics of the function changed where we're emulating the `i32.trunc_sat_f32_s` instruction rather than always replacing out-of-bounds values with zero. There is still work that could be done to improve casts such as `f32` to `u8`. That form of cast still uses the `fptosi` instruction which generates lots of branch-y code. This seems less important to tackle now though. In the meantime this should take care of most use cases of floating-point conversion and as a result I'm going to speculate that this... Closes #73591

view details

Erik Desjardins

commit sha c596e01b8ea34bb46444005425cd5aa825515f7b

add track_caller to RefCell::{borrow, borrow_mut} So panic messages point at the offending borrow.

view details

carbotaniuman

commit sha 784dd22aac3f58eebc73ff54ae0ea43682392e68

add `unsigned_abs` to signed integers

view details

Lukas Wirth

commit sha 35d6a2ef2ba71d5ea120c2879825968babcf9a89

Lint path statements to use drop for drop types

view details

Stein Somers

commit sha 532e7f49fc6719528d37f69373aec821b09cd478

Separate off a leafy insert function instead of lying, and split split similarly

view details

Joshua Nelson

commit sha e97e6fbe343d0afac795e6c13201ce31047dc219

Fix logging for rustdoc

view details

Yuki Okushi

commit sha 2e5c50195aa0345e174ff9970ec58b7e154c0132

Do not trigger `unused_braces` for `while let`

view details

David Sonder

commit sha f130e18c01a0108af23710418d8fb9eddb7647e1

Enable docs on in the x86_64-unknown-linux-musl manifest Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows people using rustup on their musl-based linux distribution to download the rust-docs. Generating and uploading the docs was enabled in b5d143b.

view details

Mark Rousskov

commit sha d2fc809fdb2e92581a0ecd70dec3e179dbd3439a

Disable building rust-analyzer on riscv64 riscv64 has an LLVM bug that makes rust-analyzer not build.

view details

Mateusz Mikuła

commit sha 594f81a2b4dae23827271ea3a4bbb21c1a0004e1

Make rust.use-lld config option work with non MSVC targets

view details

Aaron Hill

commit sha 6deda6a6a05e6e6ace8fb015d610c6355efb0fd7

Stabilize Ident::new_raw Tracking issue: #54723 This is a continuation of PR #59002

view details

Vadim Petrochenkov

commit sha 0a88346be64d0c64771d72ada8583e5795416556

rustc_ast: `(Nested)MetaItem::check_name` -> `has_name` For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc

view details

Vadim Petrochenkov

commit sha 05f414b72a26b285c7a7f6c9632945ab567a9757

rustc_ast: More detailed docs for `Attribute::check_name`

view details

bors

commit sha d8cbd9caca648ecdb66ff4c945c060762aa6297f

Auto merge of #74526 - erikdesjardins:reftrack, r=Mark-Simulacrum Add track_caller to RefCell::{borrow, borrow_mut} So panic messages point at the offending borrow. Fixes #74472

view details

bors

commit sha 1d601d6ff1879a20a25dda06b735cd44cd451f61

Auto merge of #74695 - alexcrichton:more-wasm-float-cast-fixes, r=nagisa rustc: Improving safe wasm float->int casts This commit improves code generation for WebAssembly targets when translating floating to integer casts. This improvement is only relevant when the `nontrapping-fptoint` feature is not enabled, but the feature is not enabled by default right now. Additionally this improvement only affects safe casts since unchecked casts were improved in #74659. Some more background for this issue is present on #73591, but the general gist of the issue is that in LLVM the `fptosi` and `fptoui` instructions are defined to return an `undef` value if they execute on out-of-bounds values; they notably do not trap. To implement these instructions for WebAssembly the LLVM backend must therefore generate quite a few instructions before executing `i32.trunc_f32_s` (for example) because this WebAssembly instruction traps on out-of-bounds values. This codegen into wasm instructions happens very late in the code generator, so what ends up happening is that rustc inserts its own codegen to implement Rust's saturating semantics, and then LLVM also inserts its own codegen to make sure that the `fptosi` instruction doesn't trap. Overall this means that a function like this: #[no_mangle] pub unsafe extern "C" fn cast(x: f64) -> u32 { x as u32 } will generate this WebAssembly today: (func $cast (type 0) (param f64) (result i32) (local i32 i32) local.get 0 f64.const 0x1.fffffffep+31 (;=4.29497e+09;) f64.gt local.set 1 block ;; label = @1 block ;; label = @2 local.get 0 f64.const 0x0p+0 (;=0;) local.get 0 f64.const 0x0p+0 (;=0;) f64.gt select local.tee 0 f64.const 0x1p+32 (;=4.29497e+09;) f64.lt local.get 0 f64.const 0x0p+0 (;=0;) f64.ge i32.and i32.eqz br_if 0 (;@2;) local.get 0 i32.trunc_f64_u local.set 2 br 1 (;@1;) end i32.const 0 local.set 2 end i32.const -1 local.get 2 local.get 1 select) This PR improves the situation by updating the code generation for float-to-int conversions in rustc, specifically only for WebAssembly targets and only for some situations (float-to-u8 still has not great codegen). The fix here is to use basic blocks and control flow to avoid speculatively executing `fptosi`, and instead LLVM's raw intrinsic for the WebAssembly instruction is used instead. This effectively extends the support added in #74659 to checked casts. After this commit the codegen for the above Rust function looks like: (func $cast (type 0) (param f64) (result i32) (local i32) block ;; label = @1 local.get 0 f64.const 0x0p+0 (;=0;) f64.ge local.tee 1 i32.const 1 i32.xor br_if 0 (;@1;) local.get 0 f64.const 0x1.fffffffep+31 (;=4.29497e+09;) f64.le i32.eqz br_if 0 (;@1;) local.get 0 i32.trunc_f64_u return end i32.const -1 i32.const 0 local.get 1 select) For reference, in Rust 1.44, which did not have saturating float-to-integer casts, the codegen LLVM would emit is: (func $cast (type 0) (param f64) (result i32) block ;; label = @1 local.get 0 f64.const 0x1p+32 (;=4.29497e+09;) f64.lt local.get 0 f64.const 0x0p+0 (;=0;) f64.ge i32.and i32.eqz br_if 0 (;@1;) local.get 0 i32.trunc_f64_u return end i32.const 0) So we're relatively close to the original codegen, although it's slightly different because the semantics of the function changed where we're emulating the `i32.trunc_sat_f32_s` instruction rather than always replacing out-of-bounds values with zero. There is still work that could be done to improve casts such as `f32` to `u8`. That form of cast still uses the `fptosi` instruction which generates lots of branch-y code. This seems less important to tackle now though. In the meantime this should take care of most use cases of floating-point conversion and as a result I'm going to speculate that this... Closes #73591

view details

Yuki Okushi

commit sha cc0ac7eecebd57278974329d3610bb2512740ef8

Rollup merge of #74759 - carbotaniuman:uabs, r=shepmaster add `unsigned_abs` to signed integers Mentioned on rust-lang/rfcs#2914 This PR simply adds an `unsigned_abs` to signed integers function which returns the correct absolute value as a unsigned integer.

view details

Yuki Okushi

commit sha 262fce481dc60c348ba0436caabd4a824ecc412e

Rollup merge of #75043 - petrochenkov:hasname, r=nnethercote rustc_ast: `(Nested)MetaItem::check_name` -> `has_name` For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc, only rustc needs to mark attributes as used. cc https://github.com/rust-lang/rust/pull/74932 r? @nnethercote

view details

Yuki Okushi

commit sha 485bfa7a7581e05f08a42bef3878a392c461ddc5

Rollup merge of #75056 - Veykril:path_statements_lint, r=oli-obk Lint path statements to suggest using drop when the type needs drop Fixes #48852. With this change the current lint description doesn't really fit entirely anymore I think.

view details

Yuki Okushi

commit sha c2bc733d99b99a830239c553759ce7b59ffbc507

Rollup merge of #75081 - jyn514:fix-logging, r=Mark-Simulacrum Fix logging for rustdoc https://github.com/rust-lang/rust/pull/74726#issuecomment-667765557

view details

Yuki Okushi

commit sha 4eb9253660d384cfdb73c166285bd4b3dab3f0d7

Rollup merge of #75083 - JohnTitor:follow-up-unused-braces, r=lcnr Do not trigger `unused_braces` for `while let` Follow-up for #75031 r? @lcnr

view details

push time in a day

delete branch JohnTitor/rust

delete branch : follow-up-unused-braces

delete time in a day

delete branch JohnTitor/rust

delete branch : rollup-aejluzx

delete time in a day

pull request commentrust-lang/rust

Rollup of 8 pull requests

@rustbot modify labels: +rollup @bors r+ rollup=never p=5

JohnTitor

comment created time in a day

PR opened rust-lang/rust

Rollup of 8 pull requests

Successful merges:

  • #74759 (add unsigned_abs to signed integers)
  • #75043 (rustc_ast: (Nested)MetaItem::check_name -> has_name)
  • #75056 (Lint path statements to suggest using drop when the type needs drop)
  • #75081 (Fix logging for rustdoc)
  • #75083 (Do not trigger unused_braces for while let)
  • #75084 (Stabilize Ident::new_raw)
  • #75103 (Disable building rust-analyzer on riscv64)
  • #75106 (Enable docs on in the x86_64-unknown-linux-musl manifest)

Failed merges:

r? @ghost

+297 -149

0 comment

46 changed files

pr created time in a day

push eventJohnTitor/rust

David Sonder

commit sha f130e18c01a0108af23710418d8fb9eddb7647e1

Enable docs on in the x86_64-unknown-linux-musl manifest Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows people using rustup on their musl-based linux distribution to download the rust-docs. Generating and uploading the docs was enabled in b5d143b.

view details

Yuki Okushi

commit sha aa84a76150edaf4e912fca445d54a32f2d682d9d

Rollup merge of #75106 - etherealist:docs_manifest, r=Mark-Simulacrum Enable docs on in the x86_64-unknown-linux-musl manifest Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows people using rustup on their musl-based linux distribution to download the rust-docs. Generating and uploading the docs was enabled in b5d143b (#74871). In #75102 @Mark-Simulacrum found that we are uploading the docs, but the correct manifest is missing. * The relevant call to build-manifest seems to be [in bootstrap](https://github.com/rust-lang/rust/blob/c058a8b8dc5dea0ed9b33e14da9e317e2749fcd7/src/bootstrap/dist.rs#L2334) * The manifest is then used in [promote-release crontab](https://github.com/rust-lang/rust-central-station/blob/master/crontab)

view details

push time in a day

push eventJohnTitor/rust

Mark Rousskov

commit sha d2fc809fdb2e92581a0ecd70dec3e179dbd3439a

Disable building rust-analyzer on riscv64 riscv64 has an LLVM bug that makes rust-analyzer not build.

view details

Yuki Okushi

commit sha 40adcabb77d24143bb48d5541957794e4157c089

Rollup merge of #75103 - Mark-Simulacrum:no-ra-for-riscv64, r=matklad Disable building rust-analyzer on riscv64 riscv64 has an LLVM bug that makes rust-analyzer not build. Should permit future rust-analyzer ups (e.g., https://github.com/rust-lang/rust/pull/74813) to land.

view details

push time in a day

push eventJohnTitor/rust

Aaron Hill

commit sha 6deda6a6a05e6e6ace8fb015d610c6355efb0fd7

Stabilize Ident::new_raw Tracking issue: #54723 This is a continuation of PR #59002

view details

Yuki Okushi

commit sha 622759d129e7acad53cf4d54415254db7018568c

Rollup merge of #75084 - Aaron1011:stabilize/ident-new-raw, r=petrochenkov Stabilize Ident::new_raw Tracking issue: #54723 This is a continuation of PR #59002

view details

push time in a day

push eventJohnTitor/rust

Yuki Okushi

commit sha 2e5c50195aa0345e174ff9970ec58b7e154c0132

Do not trigger `unused_braces` for `while let`

view details

Yuki Okushi

commit sha 4eb9253660d384cfdb73c166285bd4b3dab3f0d7

Rollup merge of #75083 - JohnTitor:follow-up-unused-braces, r=lcnr Do not trigger `unused_braces` for `while let` Follow-up for #75031 r? @lcnr

view details

push time in a day

push eventJohnTitor/rust

Joshua Nelson

commit sha e97e6fbe343d0afac795e6c13201ce31047dc219

Fix logging for rustdoc

view details

Yuki Okushi

commit sha c2bc733d99b99a830239c553759ce7b59ffbc507

Rollup merge of #75081 - jyn514:fix-logging, r=Mark-Simulacrum Fix logging for rustdoc https://github.com/rust-lang/rust/pull/74726#issuecomment-667765557

view details

push time in a day

push eventJohnTitor/rust

Lukas Wirth

commit sha 35d6a2ef2ba71d5ea120c2879825968babcf9a89

Lint path statements to use drop for drop types

view details

Yuki Okushi

commit sha 485bfa7a7581e05f08a42bef3878a392c461ddc5

Rollup merge of #75056 - Veykril:path_statements_lint, r=oli-obk Lint path statements to suggest using drop when the type needs drop Fixes #48852. With this change the current lint description doesn't really fit entirely anymore I think.

view details

push time in a day

push eventJohnTitor/rust

Vadim Petrochenkov

commit sha 0a88346be64d0c64771d72ada8583e5795416556

rustc_ast: `(Nested)MetaItem::check_name` -> `has_name` For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc

view details

Vadim Petrochenkov

commit sha 05f414b72a26b285c7a7f6c9632945ab567a9757

rustc_ast: More detailed docs for `Attribute::check_name`

view details

Yuki Okushi

commit sha 262fce481dc60c348ba0436caabd4a824ecc412e

Rollup merge of #75043 - petrochenkov:hasname, r=nnethercote rustc_ast: `(Nested)MetaItem::check_name` -> `has_name` For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc, only rustc needs to mark attributes as used. cc https://github.com/rust-lang/rust/pull/74932 r? @nnethercote

view details

push time in a day

create barnchJohnTitor/rust

branch : rollup-aejluzx

created branch time in a day

push eventJohnTitor/rust

carbotaniuman

commit sha 784dd22aac3f58eebc73ff54ae0ea43682392e68

add `unsigned_abs` to signed integers

view details

Yuki Okushi

commit sha cc0ac7eecebd57278974329d3610bb2512740ef8

Rollup merge of #74759 - carbotaniuman:uabs, r=shepmaster add `unsigned_abs` to signed integers Mentioned on rust-lang/rfcs#2914 This PR simply adds an `unsigned_abs` to signed integers function which returns the correct absolute value as a unsigned integer.

view details

push time in a day

pull request commentrust-lang/rust

Completes support for coverage in external crates

So mir-opt diff here is fragile a bit, let's @bors rollup=maybe just in case. @wesleywiser But if you think it's wrong, feel free to re-always it :)

richkadel

comment created time in a day

delete branch JohnTitor/rust

delete branch : rollup-zl14fp5

delete time in a day

PR closed rust-lang/rust

Rollup of 9 pull requests S-waiting-on-review rollup

Successful merges:

  • #74759 (add unsigned_abs to signed integers)
  • #75037 (Completes support for coverage in external crates)
  • #75043 (rustc_ast: (Nested)MetaItem::check_name -> has_name)
  • #75056 (Lint path statements to suggest using drop when the type needs drop)
  • #75058 (Clarify reuse of a BTreeMap insert support function and treat split support likewise)
  • #75081 (Fix logging for rustdoc)
  • #75083 (Do not trigger unused_braces for while let)
  • #75084 (Stabilize Ident::new_raw)
  • #75103 (Disable building rust-analyzer on riscv64)

Failed merges:

r? @ghost

+733 -561

4 comments

61 changed files

JohnTitor

pr closed time in a day

pull request commentrust-lang/rust

Completes support for coverage in external crates

Failed in rollup https://github.com/rust-lang/rust/pull/75122#issuecomment-668297090:

thread '[mir-opt] mir-opt/instrument_coverage.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff', src/tools/compiletest/src/runtest.rs:3238:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    [mir-opt] mir-opt/instrument_coverage.rs

test result: FAILED. 113 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

@bors r-

richkadel

comment created time in a day

pull request commentrust-lang/rust

Rollup of 10 pull requests

Hmm, I'm not familiar with that, cc @ssomers in case.

JohnTitor

comment created time in a day

issue commentrust-lang/rust

ICE when coercing `NonNull<[T; 0]>` to `NonNull<[T]>` in const fn

I think this unwrap causes the failure: https://github.com/rust-lang/rust/blob/829d69b9c6bfc535a92fc290ec9391a0d5af6c81/src/librustc_mir/transform/qualify_min_const_fn.rs#L196

So, my thought is we shouldn't unwrap here and return Err instead if it's None. @oli-obk is this correct?

rodrimati1992

comment created time in a day

push eventJohnTitor/rust

Camille GILLOT

commit sha e288d050127f0bf78b325ef4d34b8b697ce28c80

Introduce an abstraction for EvaluationCache and SelectionCache.

view details

Camille GILLOT

commit sha 2baefd3206b29b06f1cb55b91be9a2e380e7d2de

Move IntercrateAmbiguityCause to librustc_trait_selection.

view details

Camille GILLOT

commit sha 058e02145786ce50c86dd590d792271839907642

Use Lift derive proc-macro in librustc_traits.

view details

Stein Somers

commit sha f5c47fa44d64b7ae529147f9b0122b7ecda1bd92

Move bulk of BTreeMap::insert method down to new method on handle

view details

Vadim Petrochenkov

commit sha 0eacf02f01b4ea084a4f970e487ce6d3a6a20f90

tests: Ignore src/test/debuginfo/rc_arc.rs on Windows It requires loading pretty-printers, but GDB doesn't load them on Windows

view details

Tomasz Miąsko

commit sha 82651db9b2f6ecb16c773e8afa301c862118bb82

Fix change detection in CfgSimplifier::collapse_goto_chain Check that the old target is different from the new collapsed one, before concluding that anything changed.

view details

Tomasz Miąsko

commit sha 7f9f2ff9f40ed46a209cf232429120333fe42455

Remove redundant assignment from CfgSimplifier

view details

Nicholas Nethercote

commit sha d93277b9150d50fae4b086cd6efe2a006b3d88da

Remove `GCX_PTR`. We store an `ImplicitCtxt` pointer in a thread-local value (TLV). This allows implicit access to a `GlobalCtxt` and some other things. We also store a `GlobalCtxt` pointer in `GCX_PTR`. This is always the same `GlobalCtxt` as the one within the `ImplicitCtxt` pointer in TLV. `GCX_PTR` is only used in the parallel compiler's `handle_deadlock()` function. This commit does the following. - It removes `GCX_PTR`. - It also adds `ImplicitCtxt::new()`, which constructs an `ImplicitCtxt` from a `GlobalCtxt`. `ImplicitCtxt::new()` + `tls::enter_context()` is now equivalent to the old `tls::enter_global()`. - Makes `tls::get_tlv()` public for the parallel compiler, because it's now used in `handle_deadlock()`.

view details

Nicholas Nethercote

commit sha 8c78fd234be2b3adfeda8748379370e5b8433ce3

Use more appropriate `tls::with_*` methods in some places.

view details

bors

commit sha 8244b1b11488a336a485f07fd6550b973009a931

Auto merge of #74969 - nnethercote:rm-GCX_PTR, r=Mark-Simulacrum Remove `GCX_PTR`. We store an `ImplicitCtxt` pointer in a thread-local value (TLV). This allows implicit access to a `GlobalCtxt` and some other things. We also store a `GlobalCtxt` pointer in `GCX_PTR`. This is always the same `GlobalCtxt` as the one within the `ImplicitCtxt` pointer in TLV. `GCX_PTR` is only used in the parallel compiler's `handle_deadlock()` function. This commit does the following. - It removes `GCX_PTR`. - It also adds `ImplicitCtxt::new()`, which constructs an `ImplicitCtxt` from a `GlobalCtxt`. `ImplicitCtxt::new()` + `tls::enter_context()` is now equivalent to the old `tls::enter_global()`. - Makes `tls::get_tlv()` public for the parallel compiler, because it's now used in `handle_deadlock()`. r? @petrochenkov

view details

bors

commit sha 7637cbb79bad4fdc29906a21847096a997a13631

Auto merge of #75055 - cjgillot:clean-cache, r=oli-obk Introduce an abstraction for EvaluationCache and SelectionCache The small duplicated code has been moved to librustc_query_system. The remaining changes are some cleanups of structural impls.

view details

bors

commit sha 1b0ff9e7d0620daa86a80bf92f6b661f7699984e

Auto merge of #75068 - petrochenkov:ignore-debinfo, r=Mark-Simulacrum tests: Ignore src/test/debuginfo/rc_arc.rs on Windows It requires loading pretty-printers (`src\etc\gdb_load_rust_pretty_printers.py`), but GDB doesn't load them on Windows. Not sure how this passes through CI, due to an old GDB version perhaps?

view details

bors

commit sha dbc2ef25fb5e15445de38f19ba75547a6cf35cae

Auto merge of #75076 - tmiasko:simplify-goto, r=oli-obk Fix change detection in CfgSimplifier::collapse_goto_chain Check that the old target is different from the new collapsed one, before concluding that anything changed. Fixes #75074 Fixes #75051

view details

kennytm

commit sha fd7596c9a538b3c51f2d55c2d5f6ef881e6ba742

fix broken git commit in stdarch

view details

bors

commit sha c186aed59ab590eb586751afaf6b9e0ea9b78099

Auto merge of #75092 - kennytm:fix-75009, r=pietroalbini Fix broken git commit in stdarch Follow-up on #75009, point to the real master commit.

view details

bors

commit sha 829d69b9c6bfc535a92fc290ec9391a0d5af6c81

Auto merge of #74827 - ssomers:btree_cleanup_insert, r=Mark-Simulacrum Move bulk of BTreeMap::insert method down to new method on handle Adjust the boundary between the map and node layers for insertion: do more in the node layer, keep root manipulation and pointer dereferencing separate. No change in undefined behaviour or performance. r? @Mark-Simulacrum

view details

push time in a day

pull request commentrust-lang/rust

Rollup of 9 pull requests

@rustbot modify labels: +rollup @bors r+ rollup=never p=5

JohnTitor

comment created time in a day

PR opened rust-lang/rust

Rollup of 9 pull requests

Successful merges:

  • #74759 (add unsigned_abs to signed integers)
  • #75037 (Completes support for coverage in external crates)
  • #75043 (rustc_ast: (Nested)MetaItem::check_name -> has_name)
  • #75056 (Lint path statements to suggest using drop when the type needs drop)
  • #75058 (Clarify reuse of a BTreeMap insert support function and treat split support likewise)
  • #75081 (Fix logging for rustdoc)
  • #75083 (Do not trigger unused_braces for while let)
  • #75084 (Stabilize Ident::new_raw)
  • #75103 (Disable building rust-analyzer on riscv64)

Failed merges:

r? @ghost

+733 -561

0 comment

61 changed files

pr created time in a day

push eventJohnTitor/rust

Mark Rousskov

commit sha d2fc809fdb2e92581a0ecd70dec3e179dbd3439a

Disable building rust-analyzer on riscv64 riscv64 has an LLVM bug that makes rust-analyzer not build.

view details

Yuki Okushi

commit sha 55a2261246321f9e69516e22c16356f1560d3997

Rollup merge of #75103 - Mark-Simulacrum:no-ra-for-riscv64, r=matklad Disable building rust-analyzer on riscv64 riscv64 has an LLVM bug that makes rust-analyzer not build. Should permit future rust-analyzer ups (e.g., https://github.com/rust-lang/rust/pull/74813) to land.

view details

push time in a day

push eventJohnTitor/rust

Aaron Hill

commit sha 6deda6a6a05e6e6ace8fb015d610c6355efb0fd7

Stabilize Ident::new_raw Tracking issue: #54723 This is a continuation of PR #59002

view details

Yuki Okushi

commit sha 885d48144693c6e6b8f5a2a25b4d6de38d21a83f

Rollup merge of #75084 - Aaron1011:stabilize/ident-new-raw, r=petrochenkov Stabilize Ident::new_raw Tracking issue: #54723 This is a continuation of PR #59002

view details

push time in a day

push eventJohnTitor/rust

Yuki Okushi

commit sha 2e5c50195aa0345e174ff9970ec58b7e154c0132

Do not trigger `unused_braces` for `while let`

view details

Yuki Okushi

commit sha ac39b9d5cd44b8f13ab340a26427abf883e2885b

Rollup merge of #75083 - JohnTitor:follow-up-unused-braces, r=lcnr Do not trigger `unused_braces` for `while let` Follow-up for #75031 r? @lcnr

view details

push time in a day

push eventJohnTitor/rust

Joshua Nelson

commit sha e97e6fbe343d0afac795e6c13201ce31047dc219

Fix logging for rustdoc

view details

Yuki Okushi

commit sha bd004902df373333d7944e867fd96f84a5ea77bf

Rollup merge of #75081 - jyn514:fix-logging, r=Mark-Simulacrum Fix logging for rustdoc https://github.com/rust-lang/rust/pull/74726#issuecomment-667765557

view details

push time in a day

push eventJohnTitor/rust

Stein Somers

commit sha 532e7f49fc6719528d37f69373aec821b09cd478

Separate off a leafy insert function instead of lying, and split split similarly

view details

Yuki Okushi

commit sha 48f7c386cb2c02ee3d621772169f352584ea1217

Rollup merge of #75058 - ssomers:btree_cleanup_insert_2, r=Mark-Simulacrum Clarify reuse of a BTreeMap insert support function and treat split support likewise r? @Mark-Simulacrum

view details

push time in a day

push eventJohnTitor/rust

Lukas Wirth

commit sha 35d6a2ef2ba71d5ea120c2879825968babcf9a89

Lint path statements to use drop for drop types

view details

Yuki Okushi

commit sha 2ebd068b6d30a0b0a799b4f9e3e23e63617129ff

Rollup merge of #75056 - Veykril:path_statements_lint, r=oli-obk Lint path statements to suggest using drop when the type needs drop Fixes #48852. With this change the current lint description doesn't really fit entirely anymore I think.

view details

push time in a day

push eventJohnTitor/rust

Vadim Petrochenkov

commit sha 0a88346be64d0c64771d72ada8583e5795416556

rustc_ast: `(Nested)MetaItem::check_name` -> `has_name` For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc

view details

Vadim Petrochenkov

commit sha 05f414b72a26b285c7a7f6c9632945ab567a9757

rustc_ast: More detailed docs for `Attribute::check_name`

view details

Yuki Okushi

commit sha c9dff698b68d5f4148209129344eb4aa0240c7b9

Rollup merge of #75043 - petrochenkov:hasname, r=nnethercote rustc_ast: `(Nested)MetaItem::check_name` -> `has_name` For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc, only rustc needs to mark attributes as used. cc https://github.com/rust-lang/rust/pull/74932 r? @nnethercote

view details

push time in a day

push eventJohnTitor/rust

Rich Kadel

commit sha 22161c30e7ab219011c280ca5358bc3acc63b9bd

Completes support for coverage in external crates The prior PR corrected for errors encountered when trying to generate the coverage map on source code inlined from external crates (including macros and generics) by avoiding adding external DefIds to the coverage map. This made it possible to generate a coverage report including external crates, but the external crate coverage was incomplete (did not include coverage for the DefIds that were eliminated. The root issue was that the coverage map was converting Span locations to source file and locations, using the SourceMap for the current crate, and this would not work for spans from external crates (compliled with a different SourceMap). The solution was to convert the Spans to filename and location during MIR generation instead, so precompiled external crates would already have the correct source code locations embedded in their MIR, when imported into another crate.

view details

Yuki Okushi

commit sha 7abacbe1004df178d5b359352a00312b82607344

Rollup merge of #75037 - richkadel:llvm-coverage-map-gen-5.2, r=wesleywiser Completes support for coverage in external crates Follow-up to #74959 : The prior PR corrected for errors encountered when trying to generate the coverage map on source code inlined from external crates (including macros and generics) by avoiding adding external DefIds to the coverage map. This made it possible to generate a coverage report including external crates, but the external crate coverage was incomplete (did not include coverage for the DefIds that were eliminated. The root issue was that the coverage map was converting Span locations to source file and locations, using the SourceMap for the current crate, and this would not work for spans from external crates (compliled with a different SourceMap). The solution was to convert the Spans to filename and location during MIR generation instead, so precompiled external crates would already have the correct source code locations embedded in their MIR, when imported into another crate. @wesleywiser FYI r? @tmandry

view details

push time in a day

create barnchJohnTitor/rust

branch : rollup-zl14fp5

created branch time in a day

more