profile
viewpoint

csmoe/blog 1

Read rust-lang rfcs everyday.

csmoe/cargo 0

The Rust package manager

csmoe/cargo-generate 0

cargo, make me a project

csmoe/cranelift 0

Cranelift code generator

csmoe/flatbuffers 0

Memory Efficient Serialization Library

csmoe/maskedvbyte-rs 0

Rust bindings to MaskedVByte

csmoe/nvim-lsp 0

Common configurations for Neovim Language Servers

csmoe/polonius 0

Defines the Rust borrow checker.

push eventcsmoe/rust

csmoe

commit sha 078e547785ef6d0c547a93f2a38327a6db6b3273

retrieve outlives constraints from inferctxt

view details

csmoe

commit sha 7419e2e95de67db6bf631f1dca43192c543f67bd

add test for lifetime inside generator witness

view details

csmoe

commit sha e066fb13ff689db67994e1d4c7976d8ceda904cd

add region outlives to generator witness

view details

push time in 12 minutes

push eventcsmoe/rust

Yuki Okushi

commit sha cb3884adaa538a9d380ac64dd3c9bb6ce6738da6

Rollup merge of #68289 - pnkfelix:issue-62649-dont-ice-on-path-collision-in-dep-graph, r=michaelwoerister Don't ICE on path-collision in dep-graph Collisions in the dep-graph due to path-reuse are rare but can occur. So, instead of ICE'ing, just fail to mark green in such cases (for `DepKind::{Hir, HirBody, CrateMetadata}`). Fix #62649.

view details

Yuki Okushi

commit sha af0c280be6744ec62a5eccd721de61837fa75345

Rollup merge of #68378 - billyrieger:btreemap-remove-entry, r=KodrAus Add BTreeMap::remove_entry Implements https://github.com/rust-lang/rust/issues/66714.

view details

Yuki Okushi

commit sha 85f324004e2936fde4d409d9d7f9451d829cb20d

Rollup merge of #68553 - GuillaumeGomez:fix-run-button-scroll-pos, r=kinnison Fix run button positionning in case of scrolling Fixes #68337. r? @kinnison

view details

Yuki Okushi

commit sha edfa0f43458af676e6475bacb281564bcf4b0c85

Rollup merge of #68556 - ollie27:rustdoc_primitive_re-export, r=GuillaumeGomez rustdoc: Fix re-exporting primitive types * Generate links to the primitive type docs for re-exports. * Don't ICE on cross crate primitive type re-exports. * Make primitive type re-exports show up cross crate. Fixes #67646 Closes #67972 r? @GuillaumeGomez

view details

Yuki Okushi

commit sha 9c1244d6a1949076d1892586a417d9c2f8ec9dfc

Rollup merge of #68582 - LeSeulArtichaut:code-explanations, r=Dylan-DPC Add E0727 long explanation Add long explanation for the `E0727` error code (async generators not yet supported). Part of #61137 r? @GuillaumeGomez

view details

Yuki Okushi

commit sha 8d3273cdba51bd15532488056efea2ea43007344

Rollup merge of #68592 - pdbrito:master, r=jonas-schievink fix: typo in vec.rs

view details

Yuki Okushi

commit sha 10fbbf6fba4bdc8126f7fe2d208f9907e49fd4ff

Rollup merge of #68619 - gorilskij:master, r=varkor Fix a few spelling mistakes

view details

Yuki Okushi

commit sha c0df1be21e91067004bfb04e26dc34c8078e6423

Rollup merge of #68620 - kubkon:patch-1, r=Dylan-DPC Update links to WASI docs in time.rs module Since the docs for the WASI API are now evolving in [WebAssembly/WASI] repo, I thought it might be useful to update the links in the docs to point to that location instead of using the outdated `CraneStation/wasmtime` destination. [WebAssembly/WASI]: https://github.com/WebAssembly/WASI r? @steveklabnik cc @alexcrichton

view details

Josh Triplett

commit sha 9bb2a50e04460fff646830502d575b82dbf17055

Document that write_all will not call write if given an empty buffer Some types of Write instances have a semantic meaning associated with writing an empty buffer, such as sending an empty packet. This works when calling `write` directly, and supplying an empty buffer. However, calling `write_all` on an empty buffer will simply never call `write`, because `write_all` assumes it has no work to do. Document this behavior, to help prospective users of datagram-packet-style Write instances.

view details

bors

commit sha d55f3e9f1da631c636b54a7c22c1caccbe4bf0db

Auto merge of #68625 - JohnTitor:rollup-20pfcru, r=JohnTitor Rollup of 8 pull requests Successful merges: - #68289 (Don't ICE on path-collision in dep-graph) - #68378 (Add BTreeMap::remove_entry) - #68553 (Fix run button positionning in case of scrolling) - #68556 (rustdoc: Fix re-exporting primitive types) - #68582 (Add E0727 long explanation) - #68592 (fix: typo in vec.rs) - #68619 (Fix a few spelling mistakes) - #68620 (Update links to WASI docs in time.rs module) Failed merges: r? @ghost

view details

Peter Todd

commit sha f722964d00f9276b86777fab8db3fbfecd440ae7

Minor: note why we can rely on Any trait for safety

view details

bors

commit sha 343432a74d1b92e4d3e71de4271e68304e046da3

Auto merge of #68512 - spastorino:local-is-copy, r=oli-obk Local is copy r? @oli-obk

view details

bors

commit sha edb368491551a77d77a48446d4ee88b35490c565

Auto merge of #68572 - tmiasko:sanitizer-use-after-scope, r=nikic Detect use-after-scope bugs with AddressSanitizer Enable use-after-scope checks by default when using AddressSanitizer. They allow to detect incorrect use of stack objects after their scope have already ended. The detection is based on LLVM lifetime intrinsics. To facilitate the use of this functionality, the lifetime intrinsics are now emitted regardless of optimization level if enabled sanitizer makes use of them.

view details

Yuki Okushi

commit sha cef7764a7624fabeb151b861f005a9d89da91a09

Avoid ICE in macro's diagnostics

view details

Yuki Okushi

commit sha 0464692bb38d83b4664f2e5d8ca1e15381eeeecc

Update Clippy

view details

Yuki Okushi

commit sha 36fd7b9a5960a799dbfa41b032094c2b0a22143d

Rollup merge of #67722 - petertodd:2019-improve-any-comment, r=Mark-Simulacrum Minor: note how Any is an unsafe trait in SAFETY comments Motivation: helpful to people like myself reading the standard library source to better understand how to use Any, especially if we do go ahead with https://github.com/rust-lang/rust/pull/67562 and make it an unsafe trait.

view details

Yuki Okushi

commit sha 8f1857a822e7aa97337e8026896845d89f7adb47

Rollup merge of #68586 - Centril:repr-deny, r=pnkfelix Make conflicting_repr_hints a deny-by-default c-future-compat lint Closes https://github.com/rust-lang/rust/issues/68428. cc https://github.com/rust-lang/rust/issues/68585. r? @petrochenkov @pnkfelix

view details

Yuki Okushi

commit sha ed351e2818f906e87ac95cd0019ba39d62401d58

Rollup merge of #68598 - GuillaumeGomez:fix-null-synthetic_implementors, r=ollie27 Fix null synthetic_implementors error Fixes #68584. r? @ollie27 cc @kinnison

view details

Yuki Okushi

commit sha 95e7342773e05c7d3e844336dd727bf65da9c046

Rollup merge of #68603 - kornelski:patch-1, r=pietroalbini Changelog: Demonstrate final build-override syntax

view details

Yuki Okushi

commit sha 288cabde8caf11ec89bb769129cc8d0be76ee45b

Rollup merge of #68609 - Zoxc:lld-msvc, r=alexcrichton Set lld flavor for MSVC to link.exe This enables linking with LLD on Windows with just `-C linker=rust-lld` instead of needing `-C linker=rust-lld -C linker-flavor=lld-link`.

view details

push time in 33 minutes

push eventcsmoe/wasm-pack

Pauan

commit sha a8f4ddbe0533cc17fba98cc7292a434ff2dc381c

Adding in --quiet flag to suppress warnings

view details

Pauan

commit sha a522ed6c420ee048565fedc30913b4191ac7c8d6

Running cargo fmt

view details

Pauan

commit sha fc57f09688b0c68fab3e3667e54634f440907bae

Adding in log-level flag; also changing quiet to silence all stdout

view details

Pauan

commit sha bf04deee35c864dd15354f3e77bff3d24acd9ec6

Adding in -q flag

view details

Pauan

commit sha a39129ebd08787cac156af849294e214f9599f0a

Adding in docs

view details

Pauan

commit sha d04ee6c04c44926a57bf5f7b7f9f6435156886d4

Adding in unit tests for --quiet and --log-level

view details

Bo Lu

commit sha 352eea1f0d9753d3fb1b386b4e7101562d1258fa

Fix broken quickstart guide link

view details

Kelly Thomas Kline

commit sha 1b844c903c6570e30afc21201fbbb8a0ffbdfaac

Update reference to cargo's `--offline` feature

view details

Avery Harnish

commit sha f2ad82468423915349dc39700b0b29cc4c8bce18

Create npm installer

view details

Avery Harnish

commit sha f77aae20efcea20b87e4e3911c24f47e88ae46dc

Add author name

view details

Avery Harnish

commit sha b68e1fe08622993b3dc112619e3a8f652388589e

Use 0.8.1 release for npm readme

view details

ashley williams

commit sha 3ced0eb49397e4f06bad2ec207974b78c4711e71

Merge pull request #738 from EverlastingBugstopper/avery/create-npm-installer Create npm installer

view details

ashley williams

commit sha 108d06971c483d2fd36cd92a8b44d0e487e9d38e

Merge pull request #709 from burmecia/patch-1 Fix broken quickstart guide link

view details

Ashley Williams

commit sha fcbd824886e94c91ac5411d97bd685675d3daeec

fix(deps): update deprecated code for std::sync::Once

view details

Ashley Williams

commit sha 32e7bb91edb26c261bbbdc7e9d82cd470935cb53

fix(deps): cargo update

view details

ashley williams

commit sha 029127d39c619e9b5525cb3d026697d13072115f

Merge pull request #753 from rustwasm/no-more-warn fix warnings on test, update deps

view details

Gerd Jungbluth

commit sha 7d85e13d523020088023536eb838b95c86272e99

fix(docs): fix broken link and type for "Commands" refs #755

view details

Gerd Jungbluth

commit sha 9334faa5e389251b74cafff59bc3be9d4bb509ee

fix(docs): fix some typos refs #755

view details

Gerd Jungbluth

commit sha 6651b8a8e9a582c8903b725c307a9e8a6ae14b56

fix(docs): remove redundant link

view details

Avery Harnish

commit sha 6500c5f09af488e5463d0d920e089751db75189f

Bump binary-install version to fix Windows installs

view details

push time in 2 days

pull request commentrustwasm/wasm-pack

Support wasm-dis

@ashleygwilliams sorry for the delay, more commits soon.

csmoe

comment created time in 5 days

push eventcsmoe/rust

csmoe

commit sha c8aa92940d5f713ded007b8d55ddcac7696a61eb

add region outlives to generator witness

view details

push time in 8 days

push eventcsmoe/rust

csmoe

commit sha d5b24c710f46b30c0e98deed55a4b7b0dd87bd2c

add test for lifetime inside generator witness

view details

push time in 8 days

pull request commentrust-lang/rust

Suggest to shorten temporary borrow from raw pointer

@estbank ping

csmoe

comment created time in a month

issue commentrust-lang/rust

ICE when using a reference incorrectly in quick_error

https://github.com/rust-lang/rust/pull/68267 cc @estebank

milkey-mouse

comment created time in a month

IssuesEvent

issue closedrust-lang/rust

ICE when using a reference incorrectly in quick_error

I was using the latest version of quick-error and tried to store a reference without a lifetime annotated in a macro-generated error. This shouldn't (and doesn't) work, but rustc should at least throw an error instead of blowing up, right?

Code sample:

use quick_error::quick_error;

quick_error! {
    pub enum AReferenceInQuickError {
        CrashesRustc(s: &str) {
            display("hello, {}!", s)
        }
    }
}

fn main() {
    let world = "world";
    AReferenceInQuickError::CrashesRustc(world);
}

I expected an error of some sort about lifetimes or macros, but instead, the compiler paniced:

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: DistinctSources(DistinctSources { begin: (Real("src/main.rs"), BytePos(0)), end: (Macros("::quick_error::quick_error"), BytePos(7612215)) })', src/librustc_errors/lib.rs:197:29

Meta

This rustc was compiled on Gentoo from a recent master.

$ rustc --version --verbose
rustc 1.42.0-dev (2cf24ab89 2020-01-21)
binary: rustc
commit-hash: 2cf24ab89123532f0e84995301ee734a88bf4701
commit-date: 2020-01-21
host: x86_64-unknown-linux-gnu
release: 1.42.0-dev
LLVM version: 9.0

Minimal example: https://github.com/milkey-mouse/quick-error-ice Backtrace: https://github.com/milkey-mouse/quick-error-ice/blob/master/backtrace

closed time in a month

milkey-mouse

issue commentrust-lang/rust

ICE when using a reference incorrectly in quick_error

Seems fixed in lastest master https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018

milkey-mouse

comment created time in a month

pull request commentrust-lang/rust

Suggest to shorten temporary borrow from raw pointer

r? @estebank

csmoe

comment created time in a month

PR opened rust-lang/rust

Record lifetime constraints inside generator interior

Closes #64552 r? @ghost cc @Aaron1011

+26 -7

0 comment

5 changed files

pr created time in a month

push eventcsmoe/rust

Oliver Scherer

commit sha 9158e17997db0a21a27774a66b944539f4ef441a

Document more use cases of dataflow

view details

cad97

commit sha c842f02dee81e52f3b63a8b46021a8e18f143a7e

Use pointer offset instead of deref for A/Rc::into_raw

view details

CAD97

commit sha eb77f7ec6e9460c1ca70fbb7bb655f1a0a1bacfc

Add internal safety docs to (A)Rc::into_raw

view details

Oliver Scherer

commit sha 5f08df104742ce400e966f6cd80c9029f0328922

Address review comments

view details

Mikhail Zabaluev

commit sha a20013b129c10907aee0bfb5bf1cac387e48eb51

Add Result::unwrap_infallible Implementation of https://github.com/rust-lang/rfcs/pull/2799

view details

Mikhail Zabaluev

commit sha 9a99a2159bb57ee0f1a52bb3f989a903df2f8cb4

libcore: test Result::unwrap_infallible

view details

Mikhail Zabaluev

commit sha 6f0672c08b7609c7ed77245a3feea3040221b804

Rename Result::unwrap_infallible to into_ok

view details

Ralf Jung

commit sha 368ac73c11662dbb860db178dc170768078b282d

no longer promote non-pattern const functions

view details

Janusz Marcinkiewicz

commit sha 8d189ed2f1db856adc9745099d078d46fe54a087

Suggest calling method when first argument is `self`

view details

Janusz Marcinkiewicz

commit sha 8e5b2c80d3f30c9d83a8e921e78e6c10e54c8319

Add more detailed suggestion

view details

Janusz Marcinkiewicz

commit sha 091853946bc0f3e9138875bfe1952e857e601896

Add arguments to suggestion method call

view details

Janusz Marcinkiewicz

commit sha 7353afdfd9b992a0254b8c23592e91cde792d514

Extend suggestion span to whole method call

view details

Janusz Marcinkiewicz

commit sha 2168c0b9791d55361177efa3bb7e79f7b944a423

Extract checking for self arg to separate method

view details

Josh Stone

commit sha 81a6709cf9f6e83b6dd2311f4dcd9e1ef1fba284

Simplify Clone for Box<[T]> The bespoke `BoxBuilder` was basically a very simple `Vec`. Instead, let's clone to a real `Vec`, with all of its specialization for the task, then convert back to `Box<[T]>`.

view details

Janusz Marcinkiewicz

commit sha 7b91ef8837cb5e926418aeb4a675313ba928c877

Simplify match expr

view details

Oliver Scherer

commit sha 097e14d19d6b74ab0a37846ae323862ace6ac259

Treat extern statics just like statics in the "const pointer to static" representation

view details

Matt Brubeck

commit sha 207e60a364a23e15261f4fdd6471907d4fa906f4

Stabilize Condvar::wait_until and wait_timeout_until

view details

Matt Brubeck

commit sha 98d054af08017e4b7f68c4985b1ed821b845fc00

Rename wait_until/wait_timeout_until to wait_while/white_timeout_while

view details

Sebastien Marie

commit sha b817a68391bbd3cfe5285457d61111500afeb158

allow rustfmt key in [build] section

view details

Sebastien Marie

commit sha 98d8326cfc0b20b20d161fe2830bcfe2072cfdfd

add comment for rustfmt in config.toml.example

view details

push time in a month

push eventcsmoe/rust

csmoe

commit sha cd7b5edc2cac3fa0db6b464a6e94edd8f334274d

update test ui for raw-ptr borrow inside generator

view details

push time in a month

push eventcsmoe/rust

Oliver Scherer

commit sha 9158e17997db0a21a27774a66b944539f4ef441a

Document more use cases of dataflow

view details

cad97

commit sha c842f02dee81e52f3b63a8b46021a8e18f143a7e

Use pointer offset instead of deref for A/Rc::into_raw

view details

CAD97

commit sha eb77f7ec6e9460c1ca70fbb7bb655f1a0a1bacfc

Add internal safety docs to (A)Rc::into_raw

view details

Oliver Scherer

commit sha 5f08df104742ce400e966f6cd80c9029f0328922

Address review comments

view details

Matt Brubeck

commit sha 207e60a364a23e15261f4fdd6471907d4fa906f4

Stabilize Condvar::wait_until and wait_timeout_until

view details

Matt Brubeck

commit sha 98d054af08017e4b7f68c4985b1ed821b845fc00

Rename wait_until/wait_timeout_until to wait_while/white_timeout_while

view details

Matthew Jasper

commit sha 4843f227885bf23a34cc8485173c11601b00d977

Handle recursive instantiation of drop shims

view details

Mark Rousskov

commit sha 73996df6291001f0742b6409249329301aa77a23

Reset Formatter flags on exit from pad_integral This fixes a bug where after calling pad_integral with appropriate flags, the fill and alignment flags would be set to '0' and 'Right' and left as such even after exiting pad_integral, which meant that future calls on the same Formatter would get incorrect flags reported. This is quite difficult to observe in practice, as almost all formatting implementations in practice don't call `Display::fmt` directly, but rather use `write!` or a similar macro, which means that they cannot observe the effects of the wrong flags (as `write!` creates a fresh Formatter instance). However, we include a test case.

view details

Mateusz Mikuła

commit sha 66207ae7f8e793c58bccca6464feb9deeed24adf

ci: bump ubuntu 19.04 images to 19.10 Ubuntu 19.04 goes EOL this month.

view details

Guillaume Gomez

commit sha 9876f6bd9c2927633e6df21889a585469dc5fce6

Fix error code failure check in rustdoc test

view details

varkor

commit sha 3ab95ceb12b60c1564d037e8d8d6e2406fad44b3

Detail transitive containment in E0588 diagnostic

view details

Nikita Popov

commit sha 2fd4e76d88373b5ea3c3a96345c69cbcc8f56deb

Explicitly include InitializePasses.h

view details

Nikita Popov

commit sha 3ec3aa72d4ce2914d04f9dca401f38284be2c2c7

CodeGenFileType moved outside TargetMachine

view details

Nikita Popov

commit sha 30ec68a545ebc128ea8009186249b5b3616c3586

Handle removal of llvm::make_unique()

view details

Nikita Popov

commit sha 8010f4037a3f8a875d121224f2e02914e941c257

Update thinLTOInternalizeAndPromoteInIndex() usage

view details

Nikita Popov

commit sha f77f338151692e218c9e180e6518c64f6e7cc75a

Don't handle removed FlagBlockByrefStruct

view details

Nikita Popov

commit sha aa9d02ea539ceb0bcb225d8462316bf22b6bffd8

Pass isDefined parameter to createGlobalVariableExpression()

view details

Nikita Popov

commit sha 6d59017132d32c000b707d5ba51f785a78d49b02

Handle switch to Expected<StringRef> for section name

view details

Nikita Popov

commit sha c3ab84bb4f26d813c53336014ef08573a9d3018a

Switch to using MaybeAlign APIs The integer versions are deprecated

view details

Nikita Popov

commit sha 31aecccbcd8c043bfe249cfae9e7c6ef6ffd46fd

Auto-upgrade data layouts for X86 address spaces This is similar to the autoupdate LLVM performs internally.

view details

push time in a month

issue commentrust-lang/rust

async/await regression regarding borrows across yields

@yshui rustc is not that smarter yet, we already have an issue tracking this https://github.com/rust-lang/rust/issues/68112 , #68269 along with https://github.com/rust-lang/rust/pull/68212 were trying to lint users with "shorten" workground(might be lifted once the analysis is improved)

valff

comment created time in a month

push eventcsmoe/rust

csmoe

commit sha 99c877b388a6d41d726721b7c822984352b06736

update test ui for raw-ptr

view details

push time in a month

push eventcsmoe/rust

csmoe

commit sha 7425835c715ce373a22a8fa797dafec19e4fa437

update test ui for raw-ptr

view details

push time in a month

push eventcsmoe/rust

csmoe

commit sha e7d2bf2356505b44b88200e0e1fab7f7dd430b17

update test ui for raw-ptr

view details

push time in a month

push eventcsmoe/rust

csmoe

commit sha 85a11af1a8f09cf05e20842a41f4cb0d21e09464

update test ui for raw-ptr

view details

push time in a month

PR opened rust-lang/rust

Suggest to shorten temporary borrow from raw pointer

Closes https://github.com/rust-lang/rust/issues/65436 r? @estebank cc @tmandry

+76 -6

0 comment

4 changed files

pr created time in a month

push eventcsmoe/rust

csmoe

commit sha a618baaaa6cd3fb5417483b56e189691dc857f10

account temporary borrow with raw-ptr

view details

csmoe

commit sha 8059d079db11f88ec440708148ba77e10f0b74f2

update test ui for raw-ptr

view details

push time in a month

pull request commentrust-lang/rust

Suggest to shorten temporary lifetime during method call inside generator

r=@estebank

csmoe

comment created time in a month

push eventcsmoe/rust

csmoe

commit sha 4eb47ded54610300c54291aee74d5585a711e75b

wrap expr id into GeneratorInteriorTypeCause

view details

push time in a month

issue commentrust-lang/rust

Explanation for why future is not Send is wrong

yes, live-across-yield analysis inside generator should be more precise, a test case from src/test/ui:


#![feature(optin_builtin_traits)]
// edition:2018
struct Foo;

impl !Send for Foo {}

fn is_send<T: Send>(t: T) { }

async fn bar() {
    let x = Foo;
    baz().await;
}

async fn baz() { }

fn main() {
    is_send(bar());
}

this snippet will compile if the non-Send Foo's scope is shorten with a block

tmandry

comment created time in a month

push eventcsmoe/rust

csmoe

commit sha 5ad8b9e3948fa05df0b9c2a6c71146c3af10cbc8

update async-await send/sync test

view details

push time in a month

push eventcsmoe/rust

csmoe

commit sha 4fda431c4f0e101df95bf113a21284db03be86bf

update async-await send/sync test

view details

push time in a month

PR opened rust-lang/rust

Suggest to shorten temporary lifetime during method call

Closes https://github.com/rust-lang/rust/issues/67376 r? @estebank cc @tmandry @nikomatsakis

+141 -99

0 comment

10 changed files

pr created time in a month

push eventcsmoe/rust

csmoe

commit sha 23f15e355650e3060a3b0031b5e96fbcd75cc81a

update async-await send/sync test

view details

push time in a month

push eventcsmoe/rust

csmoe

commit sha b97560116785f2dbb488e66ab34aeee981ec2912

suggest to limit lifetime of temporary borrow with let

view details

csmoe

commit sha 941675e8c3e2046560850dbb90aa5d8aeb293a1a

update async-await send/sync test

view details

push time in a month

push eventcsmoe/rust

csmoe

commit sha 148c1bca0f0eb8da23a50cd876cb86cb060a8375

record generoator interior exprs in typecktable

view details

push time in a month

push eventcsmoe/rust

Trevor Spiteri

commit sha d1a3518e30febb459afeb25b4850a3222f44db8c

doc: minus (U+2212) instead of dash (U+002D) for negative infinity

view details

Mikhail Zabaluev

commit sha a20013b129c10907aee0bfb5bf1cac387e48eb51

Add Result::unwrap_infallible Implementation of https://github.com/rust-lang/rfcs/pull/2799

view details

Mikhail Zabaluev

commit sha 9a99a2159bb57ee0f1a52bb3f989a903df2f8cb4

libcore: test Result::unwrap_infallible

view details

Mikhail Zabaluev

commit sha 6f0672c08b7609c7ed77245a3feea3040221b804

Rename Result::unwrap_infallible to into_ok

view details

Ralf Jung

commit sha 368ac73c11662dbb860db178dc170768078b282d

no longer promote non-pattern const functions

view details

Janusz Marcinkiewicz

commit sha 8d189ed2f1db856adc9745099d078d46fe54a087

Suggest calling method when first argument is `self`

view details

Janusz Marcinkiewicz

commit sha 8e5b2c80d3f30c9d83a8e921e78e6c10e54c8319

Add more detailed suggestion

view details

Janusz Marcinkiewicz

commit sha 091853946bc0f3e9138875bfe1952e857e601896

Add arguments to suggestion method call

view details

Janusz Marcinkiewicz

commit sha 7353afdfd9b992a0254b8c23592e91cde792d514

Extend suggestion span to whole method call

view details

Janusz Marcinkiewicz

commit sha 2168c0b9791d55361177efa3bb7e79f7b944a423

Extract checking for self arg to separate method

view details

Mazdak Farrokhzad

commit sha e77b9d36ca5b33c7c76ca420b4021dadb8b2a05e

refactor parse_field

view details

Mazdak Farrokhzad

commit sha 8480b31ba9ca615d6c1e3e6a4a42d5757b447a0c

extract recover_struct_comma_after_dotdot

view details

Mazdak Farrokhzad

commit sha 701b974eb9df59de29a0cff86a2b6a9026e31b5a

extract find_struct_error_after_field_looking_code

view details

Mazdak Farrokhzad

commit sha 66b8ae4bce061907bb1fdb88ba6f0a9ad918c378

extract error_struct_lit_not_allowed_here

view details

Mazdak Farrokhzad

commit sha f6e2bdc341a5f25da3f29b5f37150fd320e90e8c

extract is_certainly_not_a_block

view details

Mazdak Farrokhzad

commit sha de2e443bc62a5e6ce003c850d8a2b5302950d6e3

make parse_async_block conventional

view details

Mazdak Farrokhzad

commit sha 7262dcc4a78a4e63db29410365fe7d47f2b56fd0

refactor loop parsing a bit

view details

Mazdak Farrokhzad

commit sha 44ff4df49dfbff2d21999ec9360ed8df655a6d9b

more recovery in if-parsing

view details

Mazdak Farrokhzad

commit sha 7bcc325034e4b428636cb459ccc2c49d08793fec

refactor parse_if_expr

view details

Mazdak Farrokhzad

commit sha ad6f91a4223974cdafed923658e38f7952638bb7

refactor parse_fn_block_param

view details

push time in a month

create barnchcsmoe/rust

branch : temp

created branch time in a month

CommitCommentEvent
CommitCommentEvent

issue commentrust-lang/rust

Missing unnecessary parentheses warning in constant expressions

@mental32 should be fixed within this issue.

leonardo-m

comment created time in a month

issue commentrust-lang/rust

improve diagnostics for non-send Futures that might be solved by introducing temporary variables

reproduced with exsited ui testcase:

use std::any::Any;
use std::future::Future;

struct Client(Box<dyn Any + Send>);

impl Client {
    fn status(&self) -> u16 {
        200
    }
}

async fn get() { }

pub fn foo() -> impl Future + Send {
    //~^ ERROR future cannot be sent between threads safely
    let client = Client(Box::new(true));
    async move {
        match client.status() {
            200 => {
                let _x = get().await;
            },
            _ => (),
        }
    }
}

fn main() {}
  --> $DIR/issue-64130-4-async-move.rs:21:26
   |
LL |         match client.status() {
   |               ------ has type `&Client`
LL |             200 => {
LL |                 let _x = get().await;
   |                          ^^^^^^^^^^^ await occurs here, with `client` maybe used later
...
LL |     }
   |     - `client` is later dropped here
   = note: the return type of a function must have a statically known size

rewrite the match expr as:

let status = client.status();
match status { ... }

will fix this. The problem is that client does NOT has type &Client, but .status() creates a temporary borrow &Client.

yoshuawuyts

comment created time in a month

issue commentrust-lang/rust

Extra umlaut causes error in rustc 1.42.0-nightly

cc @estebank https://github.com/rust-lang/rust/blob/f48e576756cd0c360e5522974fc8d5867b439092/src/librustc_errors/emitter.rs#L2098

apexys

comment created time in a month

issue commentrust-lang/rust

bad_style doesn't fire for associated types

bad_style checking happens inside src/librustc_lint/nonstandard_style.rs, add check_trait_item for NonCamelCaseTypes, inspect the kind of AssocitemKind inside this checking.

est31

comment created time in a month

push eventcsmoe/rust

csmoe

commit sha 44556bb32455e11c20dd52c820163fcb08245177

append region outlives into generator witness

view details

push time in a month

issue closedrust-lang/rust

ICE in nightly when using trying to preserve rand::rngs::ThreadRng across awaits

rustc 1.41.0-nightly (3eeb8d4f2 2019-12-12)

error: internal compiler error: src/librustc/hir/map/mod.rs:1031: no name for expr move ||
...
  15: rustc_errors::HandlerInner::bug
  16: rustc_errors::Handler::bug
  17: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  18: rustc::ty::context::tls::with_opt::{{closure}}
  19: rustc::ty::context::tls::with_opt
  20: rustc::util::bug::opt_span_bug_fmt
  21: rustc::util::bug::bug_fmt
  22: rustc::hir::map::Map::name
  23: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::note_obligation_cause
  24: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::report_selection_error
  25: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::report_fulfillment_errors
  26: rustc_typeck::check::FnCtxt::resolve_generator_interiors
  27: rustc::ty::context::tls::with_context::{{closure}}
  28: rustc_typeck::check::typeck_tables_of
  29: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute
  30: rustc::dep_graph::graph::DepGraph::with_task_impl
  31: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::force_query
  32: rustc::ty::query::plumbing::force_from_dep_node
  33: rustc::dep_graph::graph::DepGraph::try_mark_previous_green
  34: rustc::dep_graph::graph::DepGraph::try_mark_green
  35: rustc::dep_graph::graph::DepGraph::try_mark_green_and_read
  36: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  37: rustc_typeck::collect::type_of
  38: rustc::ty::query::__query_compute::type_of
  39: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::type_of>::compute
  40: rustc::dep_graph::graph::DepGraph::with_task_impl
  41: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  42: rustc::hir::intravisit::walk_expr
  43: rustc::hir::intravisit::Visitor::visit_fn
  44: rustc::hir::intravisit::walk_item
  45: <rustc_typeck::collect::CollectItemTypesVisitor as rustc::hir::intravisit::Visitor>::visit_item
  46: rustc::hir::map::Map::visit_item_likes_in_module
  47: rustc_typeck::collect::collect_mod_item_types
  48: rustc::ty::query::__query_compute::collect_mod_item_types
  49: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_mod_item_types>::compute
  50: rustc::dep_graph::graph::DepGraph::with_task_impl
  51: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  52: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::ensure_query
  53: rustc_typeck::check_crate::{{closure}}::{{closure}}
  54: rustc::util::common::time
  55: rustc_typeck::check_crate
  56: rustc_interface::passes::analysis
  57: rustc::ty::query::__query_compute::analysis
  58: rustc::dep_graph::graph::DepGraph::with_task_impl
  59: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  60: rustc::ty::context::tls::enter_global
  61: rustc_interface::interface::run_compiler_in_existing_thread_pool
  62: std::thread::local::LocalKey<T>::with
  63: scoped_tls::ScopedKey<T>::set
  64: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.41.0-nightly (3eeb8d4f2 2019-12-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental -C link-arg=-fuse-ld=lld --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck_tables_of] processing `client::client`
#1 [typeck_tables_of] processing `client::client::{{closure}}#0`
#2 [type_of] processing `client::client::{{closure}}#0`
#3 [collect_mod_item_types] collecting item types in module `client`
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

error: could not compile `natram`.

Source code: https://github.com/vi/natram/commit/d9cadb29c2dfc13b9dde77b5659732694ffad2ae

Full log: rustcbug.txt

Stable Rust correctly shows error:

248 |     tokio::spawn(async move {
    |     ^^^^^^^^^^^^ `std::ptr::NonNull<rand::rngs::adapter::reseeding::ReseedingRng<rand_chacha::chacha::ChaCha20Core, rand_core::os::OsRng>>` cannot be sent between threads safely

(although further message is rather big).

closed time in 2 months

vi

issue commentrust-lang/rust

ICE in nightly when using trying to preserve rand::rngs::ThreadRng across awaits

Fixed by https://github.com/rust-lang/rust/pull/67289

vi

comment created time in 2 months

push eventcsmoe/rust

Tommaso Bianchi

commit sha 2bd28d9d58abb9e71c1ad725ec246839cfca0b0a

Add regression tests

view details

Janusz Marcinkiewicz

commit sha d419a5fdaebb36dbf3c600f624c964d9ea651661

Fix pointing at arg when cause is outside of call

view details

Janusz Marcinkiewicz

commit sha e305bf8bc8cecaf93080f07962a4f763cd66f5ce

Rename tests and add short test description

view details

Esteban Küber

commit sha 3980342f3164a62ba7036711c16cc8af20d06418

Use structured suggestion for disambiguating method calls Fix #65635.

view details

Esteban Küber

commit sha 8c4f1d5f875e29e9a6e063744b71dc0a3c7deb6d

review comments

view details

Elichai Turkel

commit sha 0cc8fe5d4306c560b4a2668b01e2df97a4eb80c4

Change fmt docs for more delegations

view details

Mazdak Farrokhzad

commit sha c4bbe9cbbe9921646cdedb856e34dc951641ed96

Alias `TraitItem` & `ImplItem`. Allow defaultness on trait items syntactically.

view details

Mazdak Farrokhzad

commit sha 73557faed23678fc443f3fa52727b5f200f597d2

Use `Option` in `ImplItemKind::Const`.

view details

Mazdak Farrokhzad

commit sha f6403c6c766c704569564b9021071c4917d45a25

Use `Option` in `ImplItemKind::Method`.

view details

Mazdak Farrokhzad

commit sha c02fd3130284921f7077f78271b5501b402ec469

`TraitItemKind::Type` -> `TraitItemKind::TyAlias`.

view details

Mazdak Farrokhzad

commit sha 39073767a483d10f8b4b2ac2f32bc9573d9dabbf

Unify `{Trait,Impl}ItemKind::TyAlias` structures.

view details

Mazdak Farrokhzad

commit sha 92a372b0204a5f18286ff94648b98e4c0d6d27d2

Unify `{Impl,Trait}Item` as `AssocItem`.

view details

Mazdak Farrokhzad

commit sha 2d92aa5535e9b28f4c9244785baed719b72b9d59

Fuse associated constant parsing.

view details

Mazdak Farrokhzad

commit sha 10270bcd30d1d85a003412e597e367f2e7c89942

Fuse associated type parsing.

view details

Mazdak Farrokhzad

commit sha 7672bff3780ef0e7ba5313bf23644465644e19e6

Unify associated function parsing.

view details

Mazdak Farrokhzad

commit sha 63a9030e7b75312261733187f827df66db55cb1b

Unify associated item parsing. An exception is `fn` params.

view details

Mazdak Farrokhzad

commit sha fa828d7a0567cf833a8da9b10cc9936b3e9423dd

Relocate `is_const_item`.

view details

Mazdak Farrokhzad

commit sha 404013e015d9a9f4835cda47e56aab5223f278ed

Leave a FIXME re. `allow_plus`.

view details

Mazdak Farrokhzad

commit sha 34d91709b672d91ea9623ae4bc2275e8b003fc2c

parse: refactor fun ret ty & param ty

view details

Mazdak Farrokhzad

commit sha 9193d7a07e3c70f5f41c8a92aa34c120c9fdba0d

Unify associated item pretty printing.

view details

push time in 2 months

push eventcsmoe/rust

LeSeulArtichaut

commit sha 29e5f8e9bc2d9c6fd70941185aabcb3694fbca90

E0369 messages mimics E0277

view details

LeSeulArtichaut

commit sha 8fb729ccda8abcc43d71eafc38ab0feccc93e886

Comply to tidy checks

view details

LeSeulArtichaut

commit sha cf8c0d7a04eed6a1a5c245331dbcbf8e8a26ac8b

I have to revise left and right

view details

LeSeulArtichaut

commit sha 3bd46f1aecbcd3b7e57bd78c4dda72c076368f1f

Update UI test expectations

view details

LeSeulArtichaut

commit sha 27810e246c89777f39441d6cc050e540cb2e54e0

Restore note for PartialOrd and PartialEq

view details

LeSeulArtichaut

commit sha eac6fac10b572d4912d0bcd455c12909f63914b7

Update tests

view details

LeSeulArtichaut

commit sha e4abcfbd34f759c33da6f6d7e37235c15ede07c2

Added missing backticks

view details

Alex Crichton

commit sha 2fee28e7138d8753487ed8895ce0f5f2e643ffad

std: Implement `LineWriter::write_vectored` This commit implements the `write_vectored` method of the `LineWriter` type. First discovered in bytecodealliance/wasmtime#629 the `write_vectored` method of `Stdout` bottoms out here but only ends up writing the first buffer due to the default implementation of `write_vectored`. Like `BufWriter`, however, `LineWriter` can have a non-default implementation of `write_vectored` which tries to preserve the vectored-ness as much as possible. Namely we can have a vectored write for everything before the newline and everything after the newline if all the stars align well. Also like `BufWriter`, though, special care is taken to ensure that whenever bytes are written we're sure to signal success since that represents a "commit" of writing bytes.

view details

Josh Stone

commit sha 6c7c5120200b711262f1c67f1924ae0835080286

Fix the configure.py TOML field for a couple LLVM options The actual fields in `config.toml.example` have dashes, not underscores.

view details

Lzu Tao

commit sha 3594d8b8a14d48c8aec90a2e702cf312ea2d7f02

make htons const fn

view details

Mark Rousskov

commit sha 7f00a5f26a4687c0c667d2ca02cb73eef677ae2e

Revert "Auto merge of #67362 - Mark-Simulacrum:par-4-default, r=alexcrichton" This reverts commit 3ed3b8bb7b100afecf7d5f52eafbb70fec27f537, reversing changes made to 99b89533d4cdf7682ea4054ad0ee36c351d05df1. We will reland a similar patch at a future date but for now we should get a nightly released in a few hours with the parallel patch, so this should be reverted to make sure that the next nightly is not parallel-enabled.

view details

Matthew Healy

commit sha e77a55b5d91a7876e4ba23179d15ed0ce4affeb7

Remove outdated references to @T from comments

view details

Nicholas Nethercote

commit sha 71278cbdcb0aaf93edd370c6aec24d670a3c1eab

Remove some unnecessary `ATTR_*` constants.

view details

Markus Reiter

commit sha 58910255aab6634044fe2b6870a0ea6a4bfa0d6a

Remove `SO_NOSIGPIPE` dummy variable on platforms that don't use it.

view details

bors

commit sha 19bd93467617a447c22ec32cc1cf14d40cb84ccf

Auto merge of #67379 - Mark-Simulacrum:revert-par-4-default, r=Mark-Simulacrum Revert enabling parallelism by default We will re-land a similar patch at a future date but for now we should get a nightly released in a few hours with the parallel patch, so this should be reverted to make sure that the next nightly is not parallel-enabled. r? @ghost

view details

Mark Rousskov

commit sha 6a400ee14967a0210c31a6e272d56cbbb2b372dd

Bump stage0

view details

Mark Rousskov

commit sha 82184440ecd33e87cd03a8f7c70af2ad95d5400f

Propagate cfg bootstrap

view details

Mark Rousskov

commit sha 241d2e765dc7401e642812e43b75dbc3950f2c98

Fix compiletest fallout from stage0 bump

view details

Ohad Ravid

commit sha a4a2fc0af33ef5a4e1211c5d3e4f0eeca02322f8

Suggest associated type when the specified one cannot be found

view details

bors

commit sha c605199e89572e586a5f37bc698c48b6a10896fb

Auto merge of #67402 - Mark-Simulacrum:stage0-step, r=alexcrichton Switch bootstrap to 1.41 This updates the version number for master to 1.42 and switches the bootstrap compiler to yesterday's beta. Fallout of cfg(bootstrap) changes is also dealt with.

view details

push time in 2 months

push eventcsmoe/rust

push time in 2 months

pull request commentrust-lang/rust

Warn for bindings named same as variants when matching against a borrow

append --bless to the x.py ... command, ui err file will be updated automatically.

LeSeulArtichaut

comment created time in 2 months

issue closedrust-lang/rust

i686-pc-windows-msvc: remove pdb file

I compile on i686-pc-windows-msvc, the output file (*.exe) include RSDS information. I do not need pdb file, how can I remove it ?

closed time in 2 months

220160239

issue commentrust-lang/rust

i686-pc-windows-msvc: remove pdb file

Closes as resolved.

220160239

comment created time in 2 months

issue commentrust-lang/rust

async fn ICEs in macro on stable

Reproduced with lastest nighlty:

thread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1188:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   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:1057
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1426
   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:195
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:215
  10: rustc_driver::report_ice
  11: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
             at /rustc/119307a83e12291a3fc126735d6bd0292c443464/src/liballoc/boxed.rs:1029
  12: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}
             at /rustc/119307a83e12291a3fc126735d6bd0292c443464/src/libproc_macro/bridge/client.rs:305
  13: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:476
  14: rust_begin_unwind
             at src/libstd/panicking.rs:376
  15: core::panicking::panic_fmt
             at src/libcore/panicking.rs:84
  16: core::option::expect_failed
             at src/libcore/option.rs:1188
  17: rustc::hir::map::definitions::Definitions::invocation_parent
  18: rustc_resolve::macros::<impl rustc_expand::base::Resolver for rustc_resolve::Resolver>::visit_ast_fragment_with_placeholders
  19: rustc_expand::expand::MacroExpander::collect_invocations
  20: rustc_expand::expand::MacroExpander::fully_expand_fragment
  21: rustc_expand::expand::MacroExpander::expand_crate
  22: rustc_interface::passes::configure_and_expand_inner::{{closure}}
  23: rustc::util::common::time
  24: rustc_interface::passes::configure_and_expand::{{closure}}
  25: rustc_interface::passes::configure_and_expand
  26: rustc_interface::queries::Queries::expansion
  27: rustc_interface::interface::run_compiler_in_existing_thread_pool
  28: scoped_tls::ScopedKey<T>::set
  29: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

ICE from macro resolving I believe. cc @petrochenkov

XAMPPRocky

comment created time in 2 months

issue commentrust-lang/rust

"pattern binding is named the same as one of the variants of the type `<type>`" warning is not generated when matching against a borrow

This lint was generated by check_for_bindings_named_same_as_variants: https://github.com/rust-lang/rust/blob/9e6fb538f9254884ca9f958fdce413d6c3f2016c/src/librustc_mir/hair/pattern/check_match.rs#L287-L289 as we can see ty::Ref is just ignored, so the fix is pretty easy, just peel off all the refs in the pat_ty.

yshui

comment created time in 2 months

issue commentrust-lang/rust

internal compiler error: src/librustc_traits/normalize_erasing_regions.rs:42

@dpp I think there’s some misunderstanding here:

If possible, a self-contained reproducer in the playground would be quite helpful towards fixing the bug.

as @Centril wrote, he was just trying to guide you to create a mcve. If time is tough for you, just leave this ICE here, mvce of an ICE is not a must from the original reporter, people from the community will pick this up to minimize as the E-needs-mvce label was already added. And thanks for your reporting :)

dpp

comment created time in 2 months

create barnchcsmoe/rust

branch : upvar

created branch time in 2 months

delete branch csmoe/rust

delete branch : upvar

delete time in 2 months

issue commentrust-lang/rust

[Feature request] Consider accepting "ref _" in wildcard pattern

foo: &mut i32 works the same way as ref mut foo: i32.

crlf0710

comment created time in 2 months

issue commentrust-lang/rust

[Feature request] Consider accepting "ref _" in wildcard pattern

the more ergonomics pattern-match syntax is only available in limited situations

I disagree with this, could you list out that?

crlf0710

comment created time in 2 months

issue commentrust-lang/rust

[Feature request] Consider accepting "ref _" in wildcard pattern

ref will be phased out in the end as a more ergonomics already introduced, and wildcard already "cover" this since you can't use the ref. So I don't think itis necessary.

crlf0710

comment created time in 2 months

issue closedrust-lang/rust

"ref _" pattern should be accepted?

struct S;
impl Drop for S {
    fn drop(&mut self) {
        println!("D!");
    }
}

fn main () {
    let ref _ = S;
    
    println!("Foo");
}

I think this code should compile, but it seems it currently doesn't, giving the error

error: expected identifier, found reserved identifier `_`

This written form doesn't conflict with the description within https://doc.rust-lang.org/nightly/reference/patterns.html#reference-patterns, and is indeed useful at times

closed time in 2 months

crlf0710

issue commentrust-lang/rust

"ref _" pattern should be accepted?

this works as expected as single _ is not a valid identifier

crlf0710

comment created time in 2 months

push eventcsmoe/rust

Stephane Raux

commit sha 318c5d6c963d0e5d8ece89e804b4e696c6011955

Clarify `Box<T>` representation and its use in FFI This officializes what was only shown as a code example in [the unsafe code guidelines](https://rust-lang.github.io/unsafe-code-guidelines/layout/function-pointers.html?highlight=box#use) and follows [the discussion](https://github.com/rust-lang/unsafe-code-guidelines/issues/157) in the corresponding repository. It is also related to [the issue](https://github.com/rust-lang/rust/issues/52976) regarding marking `Box<T>` `#[repr(transparent)]`.

view details

Stephane Raux

commit sha aea94230c476fea2ee073a1bc672125e4586d4b5

Update Box representation comment based on reviews

view details

Stephane Raux

commit sha 812ec6a3bf775c1564ed3b12374c4ee81bfa94b8

Update FFI example - Use meaningful names - Clarify comments - Fix C function declaration

view details

Peter

commit sha 7bf66d97b63d90debd914d1aab1b71940edcfb0e

From<NonZero*> impls for wider NonZero types issue: https://github.com/rust-lang/rust/issues/66196

view details

Peter

commit sha ae2b192fddb8e5ecc2a7ef40dbffa6bb4b8640d5

remove irrelevant Safety section

view details

Peter

commit sha 9f88273f3d9038d3de1c394961bafa161205554d

add NonZeroU16 -> NonZeroUsize and NonZeroI16 -> NonZeroIsize

view details

Peter

commit sha 947772fc31b96ce90f57720f74571f14e35df66b

update version metadata

view details

Charles Gleason

commit sha 164d1a205d21e0bc54b60cb4e9badf27b3883ffd

Match VecDeque::extend to Vec::extend

view details

Bryan Donlan

commit sha 91ee3d1c31e5d1684e0d2ec5036dc69993b6f992

Stabilize `std::{rc,sync}::Weak::{weak_count, strong_count}` Closes: #57977

view details

Bryan Donlan

commit sha 0d0b283c2c5a4df891ca47b27f0851ef2549ac3b

Make Weak::weak_count() return zero when no strong refs remain

view details

Stefan Lankes

commit sha c874789613302d87b7b2667dead94c6e9540a877

remove dependency from libhermit The build process of the unikernel HermitCore is redesigned and doesn't longer depend on libhermit.

view details

SOFe

commit sha 9badc33cda41acadc395f1597947b185f5a9b2a3

Add str::strip_prefix and str::strip_suffix

view details

Simon Sapin

commit sha 6ddcf5044b64a03fc8fc422cdfa9946abd42c8f0

Fix unstable attribute accidentally applying to the entire impl Note `#![unstable]` v.s. `#[unstable]`

view details

SOFe

commit sha 2e2e0dfc1acfb69be9575d320418d04f3caf64a7

Improved comments to clarify sasumptions in str::strip_prefix

view details

Simon Sapin

commit sha 392e5a7150d0a7c0098631d92791a26013ba28cd

Fix the tracking issue number for `PanicInfo::message` #44489 was closed when the `#[panic_handler]` attribute was stabilized.

view details

Simon Sapin

commit sha eab1dc9b562c4ff128575d6af7afe819e34f9340

Stabilize the `core::panic` module `std::panic` is already stable. `core::panic::PanicInfo` and `core::panic::Location` are stable and can be used through that path because of a bug in stability checking: https://github.com/rust-lang/rust/issues/15702

view details

SOFe

commit sha 4718e20fcf32aa36f23e18ecf3c9ca479a6cce4c

Fixed formatting issues

view details

Christoph Schmidler

commit sha 969926fcfe68787595d384f53d19cf6b8c9df3e3

Draw vertical lines in compiler error messages with multiline annotations correctly when non-1space unicode characters are to the left For this we use the correct calculation of the 'left' identation

view details

Erin Power

commit sha 89611e17372b7b87536afa2d497cd0d557b0903f

Update RELEASES.md for 1.40.0

view details

Krishna Sai Veera Reddy

commit sha 4ca769ad091ef0018f5a20effaf4b4f428a034d7

Optimize Ord trait implementation for bool Casting the booleans to `i8`s and converting their difference into `Ordering` generates better assembly than casting them to `u8`s and comparing them.

view details

push time in 2 months

issue closedrust-lang/rust

Segment fault when compiling assembly

Compile a asm block with =m will lead the compiler to seg fault. I think if there is any error with the code, the compiler should indicate it rather than run into segment fault.

pub unsafe extern "C" fn atomic_and_u64(p: *mut u64, v: u64) -> u64 {
    asm!("lock ; andq $1, $0" : "=m"(*p) : "r"(v) : "memory");
    *p
}

Error

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name toylibc src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C panic=abort -C debuginfo=2 -C metadata=f536773699f0f74f -C extra-filename=-f536773699f0f74f --out-dir /home/schrodinger/CLionProject/toylibc/target/debug/deps -C incremental=/home/schrodinger/CLionProject/toylibc/target/debug/incremental -L dependency=/home/schrodinger/CLionProject/toylibc/target/debug/deps --extern lazy_static=/home/schrodinger/CLionProject/toylibc/target/debug/deps/liblazy_static-b4fa3bf214a3db33.rmeta --extern libm=/home/schrodinger/CLionProject/toylibc/target/debug/deps/liblibm-9d192941e1060f4a.rmeta --extern num_complex=/home/schrodinger/CLionProject/toylibc/target/debug/deps/libnum_complex-8efc7ec6cfc104f8.rmeta --extern packed_simd=/home/schrodinger/CLionProject/toylibc/target/debug/deps/libpacked_simd-91b90749ee6f08f0.rmeta --extern rand=/home/schrodinger/CLionProject/toylibc/target/debug/deps/librand-25733e87e78583f1.rmeta --extern rusty_asm=/home/schrodinger/CLionProject/toylibc/target/debug/deps/librusty_asm-107b2a2a8d9cb95d.so --extern simdeez=/home/schrodinger/CLionProject/toylibc/target/debug/deps/libsimdeez-628e9dc7fee60165.rmeta --extern spin=/home/schrodinger/CLionProject/toylibc/target/debug/deps/libspin-2a6e9c378b3e2966.rmeta --extern syscalls=/home/schrodinger/CLionProject/toylibc/target/debug/deps/libsyscalls-85e15f6b741aa697.rmeta` (signal: 11, SIGSEGV: invalid memory reference)

closed time in 2 months

SchrodingerZhu

issue commentrust-lang/rust

Segment fault when compiling assembly

Duplicate of https://github.com/rust-lang/rust/issues/29722

SchrodingerZhu

comment created time in 2 months

issue commentrust-lang/rust

Potential lifetime bug

because B is actually using X in a contravariant way

It's invariant(=covariant ^ contravariant) if I'm right, not contravariant.

crlf0710

comment created time in 2 months

push eventcsmoe/rust

csmoe

commit sha 5beadb91cd909c22c11b40c2e63a92bd2188fb70

append region outlives into generator witness

view details

push time in 2 months

push eventcsmoe/rust

LeSeulArtichaut

commit sha 29e5f8e9bc2d9c6fd70941185aabcb3694fbca90

E0369 messages mimics E0277

view details

LeSeulArtichaut

commit sha 8fb729ccda8abcc43d71eafc38ab0feccc93e886

Comply to tidy checks

view details

LeSeulArtichaut

commit sha cf8c0d7a04eed6a1a5c245331dbcbf8e8a26ac8b

I have to revise left and right

view details

LeSeulArtichaut

commit sha 3bd46f1aecbcd3b7e57bd78c4dda72c076368f1f

Update UI test expectations

view details

LeSeulArtichaut

commit sha 27810e246c89777f39441d6cc050e540cb2e54e0

Restore note for PartialOrd and PartialEq

view details

LeSeulArtichaut

commit sha eac6fac10b572d4912d0bcd455c12909f63914b7

Update tests

view details

LeSeulArtichaut

commit sha e4abcfbd34f759c33da6f6d7e37235c15ede07c2

Added missing backticks

view details

Alex Crichton

commit sha 2fee28e7138d8753487ed8895ce0f5f2e643ffad

std: Implement `LineWriter::write_vectored` This commit implements the `write_vectored` method of the `LineWriter` type. First discovered in bytecodealliance/wasmtime#629 the `write_vectored` method of `Stdout` bottoms out here but only ends up writing the first buffer due to the default implementation of `write_vectored`. Like `BufWriter`, however, `LineWriter` can have a non-default implementation of `write_vectored` which tries to preserve the vectored-ness as much as possible. Namely we can have a vectored write for everything before the newline and everything after the newline if all the stars align well. Also like `BufWriter`, though, special care is taken to ensure that whenever bytes are written we're sure to signal success since that represents a "commit" of writing bytes.

view details

Josh Stone

commit sha 6c7c5120200b711262f1c67f1924ae0835080286

Fix the configure.py TOML field for a couple LLVM options The actual fields in `config.toml.example` have dashes, not underscores.

view details

Lzu Tao

commit sha 3594d8b8a14d48c8aec90a2e702cf312ea2d7f02

make htons const fn

view details

Matthew Healy

commit sha e77a55b5d91a7876e4ba23179d15ed0ce4affeb7

Remove outdated references to @T from comments

view details

Nicholas Nethercote

commit sha 71278cbdcb0aaf93edd370c6aec24d670a3c1eab

Remove some unnecessary `ATTR_*` constants.

view details

Markus Reiter

commit sha 58910255aab6634044fe2b6870a0ea6a4bfa0d6a

Remove `SO_NOSIGPIPE` dummy variable on platforms that don't use it.

view details

Mark Rousskov

commit sha 6a400ee14967a0210c31a6e272d56cbbb2b372dd

Bump stage0

view details

Mark Rousskov

commit sha 82184440ecd33e87cd03a8f7c70af2ad95d5400f

Propagate cfg bootstrap

view details

Mark Rousskov

commit sha 241d2e765dc7401e642812e43b75dbc3950f2c98

Fix compiletest fallout from stage0 bump

view details

Ohad Ravid

commit sha a4a2fc0af33ef5a4e1211c5d3e4f0eeca02322f8

Suggest associated type when the specified one cannot be found

view details

bors

commit sha c605199e89572e586a5f37bc698c48b6a10896fb

Auto merge of #67402 - Mark-Simulacrum:stage0-step, r=alexcrichton Switch bootstrap to 1.41 This updates the version number for master to 1.42 and switches the bootstrap compiler to yesterday's beta. Fallout of cfg(bootstrap) changes is also dealt with.

view details

Mazdak Farrokhzad

commit sha eac5fb8b0ab8570b8475545f4378cb35481e9fa6

Rollup merge of #67189 - LeSeulArtichaut:binop-wording, r=estebank Unify binop wording Closes #60497 r? @estebank

view details

Mazdak Farrokhzad

commit sha bd8862340d8b26b146389ec66441bbd754843b9a

Rollup merge of #67270 - alexcrichton:write-more-line-writer, r=sfackler std: Implement `LineWriter::write_vectored` This commit implements the `write_vectored` method of the `LineWriter` type. First discovered in bytecodealliance/wasmtime#629 the `write_vectored` method of `Stdout` bottoms out here but only ends up writing the first buffer due to the default implementation of `write_vectored`. Like `BufWriter`, however, `LineWriter` can have a non-default implementation of `write_vectored` which tries to preserve the vectored-ness as much as possible. Namely we can have a vectored write for everything before the newline and everything after the newline if all the stars align well. Also like `BufWriter`, though, special care is taken to ensure that whenever bytes are written we're sure to signal success since that represents a "commit" of writing bytes.

view details

push time in 2 months

pull request commentrust-lang/rust

Fix unresolved type span inside async object

It looks reasonable, could you post the output from the original report?

Is it still the following?

error[E0698]: type inside `async fn` body must be known in this context
  --> src/lib.rs:15:13
   |
15 |             Ok(hyper::service::service_fn(move |req| {
   |             ^^ cannot infer type for `ME`
   |
note: the type is part of the `async fn` body because of this `await`
  --> src/lib.rs:24:5
   |
24 |     server.await
   |     ^^^^^^^^^^^^

error: aborting due to previous error

If so, we should have a follow up ticket to make the infered name being shown be the one from Ok, not from service_fn.

yes, still holds image

csmoe

comment created time in 2 months

create barnchcsmoe/rust

branch : generator-lifetime

created branch time in 2 months

PR opened rust-lang/rust

Fix unresolved type span inside async object

Closes #65180 r? @estebank It's hard to create a minimal repro for that issue, decided to give up finding mcve. cc previous take

+24 -7

0 comment

2 changed files

pr created time in 2 months

push eventcsmoe/rust

SOFe

commit sha 2e2e0dfc1acfb69be9575d320418d04f3caf64a7

Improved comments to clarify sasumptions in str::strip_prefix

view details

Simon Sapin

commit sha 392e5a7150d0a7c0098631d92791a26013ba28cd

Fix the tracking issue number for `PanicInfo::message` #44489 was closed when the `#[panic_handler]` attribute was stabilized.

view details

Simon Sapin

commit sha eab1dc9b562c4ff128575d6af7afe819e34f9340

Stabilize the `core::panic` module `std::panic` is already stable. `core::panic::PanicInfo` and `core::panic::Location` are stable and can be used through that path because of a bug in stability checking: https://github.com/rust-lang/rust/issues/15702

view details

Camille GILLOT

commit sha 68b1ac98744b8e03bbcc5ab38f3afbd04f1ec097

Reduce righward drift.

view details

SOFe

commit sha 4718e20fcf32aa36f23e18ecf3c9ca479a6cce4c

Fixed formatting issues

view details

bors

commit sha 1dc3686f8b4853eb8c1a6a6ace6cf4ceae63b2a1

Auto merge of #66631 - michaelwoerister:additional-pgo-tests, r=alexcrichton Add additional regression tests for PGO This PR adds regression tests for making sure that - instrumentation records the right counts for branches taken and functions called, and that - the indirect call promotion pass actually is able to promote indirect calls. r? @alexcrichton

view details

Guillaume Gomez

commit sha 77ecb6d44a48f079337c85962bd9f39e1c96594c

Clean up E0072 long explanation

view details

Guillaume Gomez

commit sha 2af8cd2de87322858084bfc2598e766116178b5a

Clean up E0075 long explanation

view details

Oliver Scherer

commit sha a3297562f6c1bb8ca7bcb80d265fc41dc10d5a9f

Show the sign of signed interpreter values

view details

Mark Rousskov

commit sha 47b3d4d8c937f174a8863fb123356ad51bd524b7

Revert "DO NOT MERGE: enable windows try builder" This reverts commit 90a37bce44d145715eeac9f1f2f34433fc813ef0.

view details

Nadrieril

commit sha cdc844e81f186c62e9368a24e3b8edba1ef6143b

Make the ice a fatal error

view details

Nadrieril

commit sha 0881750173d714770713f989332464eb5498574e

Move tests to ui, split them and add some

view details

Guanqun Lu

commit sha 55d725884b1fb62cbec038d8633bd40c39cc896f

follow the same function order in the trait This removes several warnings in IDE.

view details

Mara Bos

commit sha fd9b986bfe47f2d4666216a35edf66981b923ac9

Add core::{f32,f64}::consts::TAU.

view details

Mara Bos

commit sha d220ed4fd72a26e40edf0d61bcd9ac52dc87f009

Add tracking issue number.

view details

bors

commit sha 797fd92628842c1f5face9fb93b0fe4f1f9d297f

Auto merge of #66776 - Mark-Simulacrum:revert-try-breakage, r=Mark-Simulacrum Revert "DO NOT MERGE: enable windows try builder" This reverts commit 90a37bce44d145715eeac9f1f2f34433fc813ef0.

view details

Camille GILLOT

commit sha 144d1c217151bbb6fea6a93a22e9dc9bfabae77f

Review nits.

view details

Joshua Nelson

commit sha f1f83ef8f84c15ab5292cd2dbbb0c7b0f14cbc1e

Test multiple variants Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>

view details

Janusz Marcinkiewicz

commit sha 5c34a11324b060b0492eb390c7e9b2abc9eb61a4

Refactor 'parse_enum_item' to use 'parse_delim_comma_seq'

view details

Christoph Schmidler

commit sha 969926fcfe68787595d384f53d19cf6b8c9df3e3

Draw vertical lines in compiler error messages with multiline annotations correctly when non-1space unicode characters are to the left For this we use the correct calculation of the 'left' identation

view details

push time in 2 months

issue commentrustwasm/wasm-pack

wasm-pack build fail

/usr/include missing is a common issue on macos.

xcode-select --install

might help, if not, search with fatal error: 'stdio.h' file not found macos, you should find some solutions.

Taoja

comment created time in 2 months

push eventcsmoe/cranelift

Andrew Brown

commit sha 8c2a8847143d52945cd9b355608d4adfa211ae44

Truncate over-large parameters to splat (#1276) See https://github.com/WebAssembly/simd/issues/149 for associated discussion on this.

view details

Andrew Brown

commit sha ec787eb281bb2e18e191508c17abe694e91f0677

Remove packed_struct dependency; closes #1271 and #1284 (#1282)

view details

Joshua Nelson

commit sha 2d3252c1e6b53b34823dac3f250b91d064a2adac

[module] Finalize definitions for the end-user Closes https://github.com/bytecodealliance/cranelift/issues/1288 by calling `module.finalize_definitions` whenever `module.finish` is called.

view details

Andrew Brown

commit sha e4b5102615ddf20f60ab04980249b85d3dba41ed

Fix `scalar_to_vector`: move not wide enough for 64-bit values (#1287) Previously, the use of `enc_x86_64` emitted two 64-bit mode encodings for `scalar_to_vector.i64`, neither of which contained the REX.W bit telling `MOVD/MOVQ` to move 64 bits of data instead of 32 bits. Now, `scalar_to_vector.i64` will always use a sole 64-bit mode REX.W encoding and `scalar_to_vector` with other widths will have three encodings: a 32-bit mode move, a 64-bit mode move with no REX, and a 64-bit mode move with REX (but not REX.W).

view details

Andrew Brown

commit sha d2b7d800c25bda5b6f8a3bcb452de95c65d1e141

Fix legalization of SIMD `fneg` (#1286) Previously `fsub` was used but this fails when negating -0.0 and +0.0 in the SIMD spec tests; using more instructions, this change uses shifts to create a constant for flipping the most significant bit of each lane with `bxor`.

view details

Andrew Brown

commit sha 39877b1706336523a49107edddd3b47f4ef02e07

Fix legalization of `icmp ugt` (#1278) Previously, the same pattern (pmax + pcmpeq) as `uge` was used but this logic was incorrect for operands with equal values.

view details

Philip Craig

commit sha 1335f3bf0081cbf40c1db18fa060b47df72c66eb

Fix build failure in cranelift-codegen (#1294) error[E0425]: cannot find value `ones` in this scope --> cranelift-codegen/meta/src/isa/x86/legalize.rs:564:33 | 564 | def!(c = vconst(ones)), | ^^^^ not found in this scope

view details

Y-Nak

commit sha 3d149c81e39d641f03686c25de9fbba0213629f6

Report when output register annotation is missing (#1289)

view details

push time in 2 months

create barnchcsmoe/cranelift

branch : ref

created branch time in 2 months

pull request commentbytecodealliance/cranelift

Do not panic when reference types found but safepoints not enabled

@bnjbvr okay, I'll move it. btw, cranelift seems planning to improve the docs https://github.com/bytecodealliance/cranelift/issues/1265 , is there any chance for me to contribute from a know-nothing-about-wasm-cranelift perspective? the benefit I can imagine is making the docs more friendly to beginners but might annoy your seniors with lots of "stupid" questions during writing.

csmoe

comment created time in 2 months

issue commentrustwasm/wasm-pack

can't run wasm-pack build on aarch64

It's a rustc issue actually, cc https://github.com/rust-lang/rust/issues/52362

rolandoam

comment created time in 2 months

pull request commentbytecodealliance/cranelift

Do not panic when reference types found but safepoints not enabled

@bnjbvr to reproduce this panic, I had to insert test safepoint statement, should I place this test into filetests/safepoint? Or just leave it inside filetests/verifier?

test safepoint
target x86_64

function %test(i32, r64, r64) -> r64 {
    ebb0(v0: i32, v1:r64, v2:r64):
        jump ebb1(v0)
    ebb1(v3: i32):
        v4 = irsub_imm v3, 1
        jump ebb2(v4)
    ebb2(v5: i32):
        resumable_trap interrupt
        brz v5, ebb1(v5)
        jump ebb3
    ebb3:
        v6 = null.r64
        v7 = is_null v6
        brnz v7, ebb2(v0)
        jump ebb4
    ebb4:
        brnz v0, ebb5
        jump ebb6
    ebb5:
        return v1
    ebb6:
        return v2
}
csmoe

comment created time in 2 months

push eventcsmoe/wasm-pack

csmoe

commit sha 2a2e1392b1f10faa6b898c124f91f4244552a77c

wat: introuduce wasm toolkits based on wasm-opt

view details

push time in 2 months

PR closed csmoe/wasm-pack

Make sure these boxes are checked! 📦✅
  • [ ] You have the latest version of rustfmt installed
$ rustup component add rustfmt
  • [ ] You ran cargo fmt on the code base before submitting
  • [ ] You reference which issue is being closed in the PR text

✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨

+2815 -570

0 comment

49 changed files

csmoe

pr closed time in 2 months

PR opened rustwasm/wasm-pack

Support wasm-dis

Closes #748

+132 -0

0 comment

2 changed files

pr created time in 2 months

PR opened csmoe/wasm-pack

Make sure these boxes are checked! 📦✅
  • [ ] You have the latest version of rustfmt installed
$ rustup component add rustfmt
  • [ ] You ran cargo fmt on the code base before submitting
  • [ ] You reference which issue is being closed in the PR text

✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨

+2815 -570

0 comment

49 changed files

pr created time in 2 months

create barnchcsmoe/wasm-pack

branch : wat

created branch time in 2 months

issue commentrustwasm/wasm-pack

error: could not compile `net2`.

make sure you have openssl installed on your environment.

wangyiran125

comment created time in 2 months

pull request commentbytecodealliance/cranelift

Do not panic when reference types found but safepoints not enabled

@bnjbvr sorry for a stupid question, how to add a test for this? cannot find testing-docs about deal with .wasm file.

csmoe

comment created time in 2 months

pull request commentbytecodealliance/cranelift

Do not panic when reference types found but safepoints not enabled

@bnjbvr okay. would you mind reopening this PR? mindless close click.

csmoe

comment created time in 2 months

PR closed bytecodealliance/cranelift

Do not panic when reference types found but safepoints not enabled

Closes #1257 r? @bnjbvr

  • [x] This has been discussed in issue #1257
  • [ ] A short description of what this does, why it is needed:
  • [ ] This PR contains test cases, if meaningful.
  • [x] A reviewer from the core maintainer team has been assigned for this PR. If you don't know who could review this, please indicate so and/or ping bnjbvr. The list of suggested reviewers on the right can help you.

<!-- Please ensure all communication adheres to the code of conduct. -->

+0 -0

0 comment

0 changed file

csmoe

pr closed time in 2 months

push eventcsmoe/cranelift

push time in 2 months

PR opened bytecodealliance/cranelift

Closes #1257 r? @bnjbvr
  • [x] This has been discussed in issue #1257
  • [ ] A short description of what this does, why it is needed:
  • [ ] This PR contains test cases, if meaningful.
  • [x] A reviewer from the core maintainer team has been assigned for this PR. If you don't know who could review this, please indicate so and/or ping bnjbvr. The list of suggested reviewers on the right can help you.

<!-- Please ensure all communication adheres to the code of conduct. -->

+1 -1

0 comment

1 changed file

pr created time in 2 months

push eventcsmoe/cranelift

csmoe

commit sha 7dc2edd15fd8cf05d4f7ff553cfe6ac3ae7a469f

Do not when panic reference types found but safepoints not enabled

view details

push time in 2 months

issue commentrust-lang/rust

Explain editions when trying to use async block in 2015 edition

fn foo() {
    let x = async {};
}
error[E0422]: cannot find struct, variant or union type `async` in this scope
 --> src/main.rs:3:12
  |
3 |    let x = async {}; 
  |            ^^^^^ not found in this scope

error: aborting due to previous error

For more information about this error, try `rustc --explain E0422`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.

playground

estebank

comment created time in 2 months

issue commentneovim/nvim-lsp

lua lsp docs should be expanded

neovim keeps error'd with helpless message on settings, it's really annoying for users without lua background to config nvim-lsp :(, have to "learn" lua before adding a simple settings

mhartington

comment created time in 2 months

CommitCommentEvent

push eventcsmoe/rust

Esteban Küber

commit sha 0ff73535ed0044c517697fa3527da3f52069dc3d

Move `trait_ref_to_existential` to a closure review comment

view details

Guillaume Gomez

commit sha 4610867c2bd01901a936fc84710360c3a2a47dd8

Add long error explanation for E0594

view details

Guillaume Gomez

commit sha cd13335ae23c115275d2c99728f3e66efc25993d

Update ui tests

view details

Aaron Hill

commit sha 0e2ccaaa3e70d85d1243c07e6ac0ef3829115a8d

Fix 'type annotations needed' error with opaque types Related: #66426 This commit adds handling for opaque types during inference variable fallback. Type variables generated from the instantiatino of opaque types now fallback to the opque type itself. Normally, the type variable for an instantiated opaque type is either unified with the concrete type, or with the opaque type itself (e.g when a function returns an opaque type by calling another function). However, it's possible for the type variable to be left completely unconstrained. This can occur in code like this: ```rust pub type Foo = impl Copy; fn produce() -> Option<Foo> { None } ``` Here, we'll instantatiate the `Foo` in `Option<Foo>` to a fresh type variable, but we will never unify it with anything due to the fact that we return a `None`. This results in the error message: `type annotations needed: cannot resolve `_: std::marker::Copy`` pointing at `pub type Foo = impl Copy`. This message is not only confusing, it's incorrect. When an opaque type inference variable is completely unconstrained, we can always fall back to using the opaque type itself. This effectively turns that particular use of the opaque type into a non-defining use, even if it appears in a defining scope.

view details

Aaron Hill

commit sha 61c75bdb11e782ee50ff1e4de6d29fd5ff4f0e31

Add explanation of unconstrained opaque type

view details

Aaron Hill

commit sha f87177b1c5df80d98e8f9c4645ecfc68edbae931

Replace bool with new `FallbackMode` enum

view details

Aaron Hill

commit sha a11abe0d6b0f1a7a7bb4bdfde1dedfd89b357732

Update test output

view details

Esteban Küber

commit sha 83ffda5216a9a4248221b980ee08c30ac6e517f8

Specific labels when referring to "expected" and "found" types

view details

Esteban Küber

commit sha b2e6aef0731990c98a6fb7ac6f890aa359a5e9e6

review comments: tweak prefix strings

view details

Esteban Küber

commit sha 94c642546497dd4c04609bd6dbe7631fb56df1fa

Remove E0308 note when primary label has all info

view details

Esteban Küber

commit sha 6f8f70624b99460481af25764b9e02d2c67b42c5

Surround types with backticks in type errors

view details

Esteban Küber

commit sha b3517cdee7ba611dae3111370b3f5a815a5b4369

review comments

view details

bors

commit sha 3e525e3f6d9e85d54fa4c49b52df85aa0c990100

Auto merge of #54733 - GuillaumeGomez:stabilize-rustdoc-theme, r=ollie27,Dylan-DPC Stabilize rustdoc theme options Closes #54730 This PR stabilizes the `--themes` (now `--theme`) and `--theme-checker` (now `--check-theme`) options, for allowing users to add custom themes to their documentation. Rustdoc includes two themes by default: `light` and `dark`. Using the `--theme` option, you can give rustdoc a CSS file to include as an extra theme for that render. Themes are named after the CSS file used, so using `--theme /path/to/your/custom-theme.css` will add a theme called `custom-theme` to the documentation. Even though the CLI flag to add a theme is getting stabilized, there's no guarantee that a theme file will always have the same effect on documentation generated with future versions of rustdoc. To aid in ensuring that a theme will work, the flag `--check-theme` is also available, which compares the CSS rules defined by a custom theme against the ones used in the `light` theme. If the `light` theme defines a CSS rule that the custom theme does not, rustdoc will report an error. (Rustdoc also performs this check for themes given to `--theme`, but only reports a warning when a difference is found.)

view details

Esteban Küber

commit sha 614da98454984921142eb2059db7be953d2c855c

review comments

view details

Agustin Fernandez

commit sha aae76304f98e4830c405b2ae16821ddcdf03c2b9

Add more context to `async fn` trait error. Suggest `async-trait`.

view details

Esteban Küber

commit sha a7678779a168d7b49cc22b073c8b68feb6d02d99

Reword help and add test

view details

Vadim Petrochenkov

commit sha f74fe812fe802c71bd9f909cbce8a703a20ba479

resolve: Give derive helpers highest priority during resolution

view details

Gabriel Smith

commit sha 041a612dad70dbcc69189773ee396fcb55bda4f5

resolve: Allow idents to resolve to primitives in the type namespace

view details

Gabriel Smith

commit sha 128ca7415f970b13150e90b4705188d7f076d389

rustc: hir: Add method to check validity of a Res/Def in a namespace

view details

Gabriel Smith

commit sha 7b4642f44178403770cc35166fb676b7fa051bec

resolve: late: Check if type arg is really a const arg A path type argument could be a generic const argument due to limitations as to what we can determine at parsing. We double check just to be sure by trying to resolve in the type namespace first, and if that fails we try again in the value namespace. If resolution in the value namespace succeeds, we have a generic const argument on our hands.

view details

push time in 2 months

issue commentrust-lang/rust

GAT: Constructing associated types parameterised by lifetime

@dhardy sorry, my fault. Self::B works here because of lifetime elision, NOT unneeded actually

dhardy

comment created time in 2 months

issue commentrust-lang/rust

GAT: Constructing associated types parameterised by lifetime

lifetime is not needed here -> Self::<'a>, just return Self::B.

dhardy

comment created time in 2 months

PR opened rust-lang/cargo

Add spport for pgo

Closes #7618

+5 -0

0 comment

2 changed files

pr created time in 2 months

push eventcsmoe/cargo

Nathan Froyd

commit sha 5d98ed4b8b8b32f3e9e0a4a3d9e433b16b791995

fix typo in rustc.rs comment

view details

bors

commit sha c9330feb48e6169d25cc0c57ef9477a9b9ba8014

Auto merge of #6879 - froydnj:patch-1, r=ehuss fix typo in rustc.rs comment

view details

Aaron Hill

commit sha 87f1a4b217630bd663dbf891fc970c1bc8b192d6

Implement the 'frontend' of public-private dependencies This is part of https://github.com/rust-lang/rust/issues/44663 This implements the 'frontend' portion of RFC 1977. Once PRs https://github.com/rust-lang/rust/pull/59335 and https://github.com/rust-lang/crates.io/pull/1685 are merged, it will be possible to test the full public-private dependency feature: marking a dependency a public, seeing exported_private_dependencies warnings from rustc, and seeing pub-dep-reachability errors from Cargo. Everything in this commit should be fully backwards-compatible - users who don't enable the 'public-dependency' cargo feature won't notice any changes. Note that this commit does *not* implement the remaining two features of the RFC: * Choosing smallest versions when 'cargo publish' is run * Turning exported_private_dependencies warnings into hard errors when 'cargo publish' is run The former is a major change to Cargo's behavior, and should be done in a separate PR with some kind of rollout plan. The latter is described by the RFC as being enabled at 'some point in the future'. This can be done via a follow-up PR.

view details

Aaron Hill

commit sha be9ae5e547a83b3348406c7d73dcbd56cde82e63

Fix error message on stable

view details

Aaron Hill

commit sha 715d6ace0275f9577ec453d08fdaaf27d243ef68

Update unstable reference

view details

Aaron Hill

commit sha 8185564a53e28913617418f2c8a2b59f7422a0b2

Track 'public/private' depenendecy status in fingerprint

view details

Aaron Hill

commit sha 8a45e5c0b01ae716292de879ccc39cb07d72b798

Format pub_priv test

view details

Aaron Hill

commit sha e578fc1835d8259e700b38fb2e07f31bb731d749

Fix serializing fingerprint

view details

Aaron Hill

commit sha a22a7dbc382dc4fa408dae2f55ef6b1cc0e2fc1f

Pass --extern-private or --extern, but not both

view details

Aaron Hill

commit sha 8c8824fad86c6f923556f3c8a23bfc742dda361d

Remove 'private' flag

view details

Aaron Hill

commit sha df4d2095ac7fce5cfd68eebf45caf3317bc3d71b

Prevent 'public' specifier from being used on non-Normal dependencies

view details

Aaron Hill

commit sha 2de44c47ce6f25ec38847ee34d676903f66682dd

Relax assertion

view details

Aaron Hill

commit sha f4aac94f12b293d51064babdefd1c8c3e3d593b0

Properly fix assertion and tests

view details

bors

commit sha 0c891a0091a6c658c8a34df6098f31499ba0a8d9

Auto merge of #6853 - Eh2406:caching-the-dependency, r=alexcrichton Caching the dependencies There are 2 sources of facts for the resolver: 1. The `Registry` tells us for a Dependency what versions are available to fulfil it. 2. The `Summary` tells us for a version (and features) what dependencies need to be fulfilled for it to be activated. The `Registry` was cached with a `RegistryQueryer` back in #5112. This adds a `DepsCache` to cache the calculation of which dependencies are activated by features. In the happy path `flag_activated` means that we don't get to reuse `build_deps`, but the more we backtrack the more time we save. In pathological cases like https://github.com/rust-lang/cargo/issues/6258#issuecomment-479204465, I have measured this as a 10% improvement with release. This also means that `build_deps` can be run in a context free way, which may be useful in a follow up PR to solve https://github.com/rust-lang/cargo/issues/6258#issuecomment-482620770.

view details

bors

commit sha 7b13469ee90a24fa5aa06166d447dac3370846ef

Auto merge of #6772 - Aaron1011:feature/final-pub-priv, r=ehuss Implement the 'frontend' of public-private dependencies This is part of https://github.com/rust-lang/rust/issues/44663 This implements the 'frontend' portion of [RFC 1977](https://github.com/rust-lang/rfcs/blob/master/text/1977-public-private-dependencies.md). Once PRs https://github.com/rust-lang/rust/pull/59335 and https://github.com/rust-lang/crates.io/pull/1685 are merged, it will be possible to test the full public-private dependency feature: marking a dependency a public, seeing exported_private_dependencies warnings from rustc, and seeing pub-dep-reachability errors from Cargo. Everything in this commit should be fully backwards-compatible - users who don't enable the 'public-dependency' cargo feature won't notice any changes. Note that this commit does *not* implement the remaining two features of the RFC: * Choosing smallest versions when 'cargo publish' is run * Turning exported_private_dependencies warnings into hard errors when 'cargo publish' is run The former is a major change to Cargo's behavior, and should be done in a separate PR with some kind of rollout plan. The latter is described by the RFC as being enabled at 'some point in the future'. This can be done via a follow-up PR.

view details

Eric Huss

commit sha 2cbb701b9205213a2864edf2daa314e7ad225f4c

Add a changelog.

view details

Erich Schroeter

commit sha c666645819e7d8f94edae763bcfbdb9d929dcc58

Fixed minor grammar phrasing

view details

bors

commit sha 8fd0bd46e674be5eec1ae6ff397b436ccf5e11a0

Auto merge of #6885 - erichschroeter:patch-1, r=ehuss Fixed minor grammar phrasing I don't think this change is anything ground breaking, but I think it makes more sense.

view details

Alex Helfet

commit sha 0dda8f5f72ee18349790850def86bd4f6ede7440

Added a few tests for relative registry index URLs, fixed a bug.

view details

Eric Huss

commit sha a9ae668c1b73d12be6d33d3a58dfc139aeeafa7b

Attempt to debug a spurious test.

view details

push time in 2 months

PR closed csmoe/cargo

[WIP]Feature: add suport for PGO
+6 -1

0 comment

2 changed files

csmoe

pr closed time in 2 months

PR opened csmoe/cargo

[WIP]Feature: add suport for PGO

Closes #7618

+6 -1

0 comment

2 changed files

pr created time in 2 months

more