profile
viewpoint
Esteban Kuber estebank San Francisco, CA http://esteban.kuber.com.ar/resume/ Off-by-one error fixer/introducer. I 💖@rust-lang⚙️ PST tz

estebank/galvanize 9

Galvanize: Pure Rust CDB reader/writer

commure/hazy 5

OpaqueDebug implementation

estebank/jsmk 4

Javascript Canvas based fighting game engine

estebank/panorama 2

HTML5+JS diff display

estebank/resume 2

My HTML resume. It's self-contained with no external dependencies. Emphasis on readability across User Agents.

estebank/difference.rs 1

Rust text diffing and assertion library

estebank/galvanize_cli 1

CLI Tool to interact with CDBs.

estebank/pysmell 1

PySmell is an attempt to create an IDE completion helper for python.

estebank/atom 0

trying things out

pull request commentrust-lang/rust

Use `insert_same` in `insert_evaluation_cache`

The code change looks correct, but deferring to @eddyb

GabrielMajeri

comment created time in 4 hours

Pull request review commentrust-lang/rust

correctly dedup `ExistentialPredicate`s

 impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {             )

I see what's happening. In the type test that is now passing we probably shouldn't allow people to override the type params that are set in the type, and error when that happens. @nikomatsakis might have better insight on what we should continue to do, but the more I look at how we treat type aliases the more I want to revamp them.

(I failed to publish this back on the 28th)

lcnr

comment created time in a month

pull request commentrust-lang/rust

Add derive macro for specifying diagnostics using attributes.

Haven't looked at this yet, but it will be interesting to be able to allow us to impl the derived trait by hand in cases where we want more advanced behavior, like changing the output or wording depending on span ordering to give an example.

jumbatm

comment created time in 7 hours

issue commentrust-lang/rust

async-std docs no longer build on recent nightlies

Can we confirm that this hasn't reached beta as well?

yoshuawuyts

comment created time in a day

Pull request review commentrust-lang/rust

Do not trigger `unused_braces` for `while let`

+// check-pass++#![deny(unused_braces)]++fn main() {+    let mut a = Some(3);+    // Shouldn't warn below `a`.+    while let Some(ref mut v) = {a} {

I would be very uneasy at allowing while let pat = { a } { /**/ } precisely due to @lzutao's point. 🤔

JohnTitor

comment created time in a day

Pull request review commentrust-lang/rust

Avoid complex diagnostics in snippets which contain newlines

+error: future cannot be sent between threads safely+  --> $DIR/issue-70935-complex-spans.rs:10:45+   |+LL |   fn foo(tx: std::sync::mpsc::Sender<i32>) -> impl Future + Send {+   |                                               ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`+LL |+LL | /     async move {+LL | |         baz(|| async{+LL | |             foo(tx.clone());+LL | |         }).await;+LL | |     }+   | |_____- this returned value is of type `impl std::future::Future`+   |+   = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<i32>`+note: future is not `Send` as this value is used across an await+  --> $DIR/issue-70935-complex-spans.rs:13:9+   |+LL |            baz(|| async{+   |  __________^___-+   | | _________|+   | ||+LL | ||             foo(tx.clone());+LL | ||         }).await;+   | ||         -      ^- value is later dropped here+   | ||_________|______|+   | |__________|      await occurs here, with value maybe used later

This should be something like the value instead.

We should also detect these kinds of overlapping spans and emit two three separate notes instead of just one.

JohnTitor

comment created time in 3 days

startedgetsentry/sentry-rust

started time in 4 days

push eventestebank/rust

Esteban Küber

commit sha 32394239fea058a7bf596d408aa0fe36ea33018b

Use `inherit` to explicitly propagate `stable` attrs

view details

push time in 4 days

push eventestebank/rust

Caio

commit sha 187aea7c34adf06b0db39f688d60d3fdac8e7e3e

Impl Default for ranges

view details

Mohsen Zohrevandi

commit sha c4b02659c16d2ad0ac36d2c8602edd002e559f7a

Enable some timeouts in SGX platform This would partially resolve https://github.com/fortanix/rust-sgx/issues/31

view details

Mohsen Zohrevandi

commit sha d7dc64bdfea4fbf8974774800ab51e04eaa4f082

Handle spurious wakeups in wait_timeout_sgx

view details

Mohsen Zohrevandi

commit sha c5d1fcd2309b6903fed82aba6e0fdc2fa85bc874

Allow more ui tests for SGX

view details

flip1995

commit sha f7acea2683c6124854bfe20e7127e4dfba344d3e

Register redundant_field_names and non_expressive_names as early passes

view details

flip1995

commit sha 485229c4a3d6a2fbe40f5a6976a33144a27497c6

Fix fallout in redundant_field_names

view details

flip1995

commit sha efd3dcff97f67f376e354c047133ce9044c52991

Fix fallout in similar_names

view details

Eduardo Broto

commit sha bb37a0f948b02e6434dbe3ea615960052d37f784

Avoid triggering similar names on code from expansion

view details

Mohsen Zohrevandi

commit sha 3442d23c1a12f1f01a0e07b6bec72b58998f49ef

Improve wait_timeout_sgx, simplify usercalls::wait

view details

Alexis Bourget

commit sha 2853448426ce76926baa7e6e6173c15228e4951a

Document the ref keyword

view details

Alexis Bourget

commit sha 249e07b237bd3049eb7fd94afe450b7c09b6a3d9

Short documentation for the false keyword

view details

Stefan Lankes

commit sha 6813c1c69baf870a479c70e23ad0550d1d9aa9be

revise RwLock, which is derived from the wasm implementation - increasing the readability of `Condvar` - simplify the interface to the libos HermitCore

view details

Stefan Lankes

commit sha 3acc3ef10d2099a4b3118e8c705b36f4bbaf6f64

minor changes to pass the format check

view details

Stefan Lankes

commit sha beb1b1fa5b1047c7caf8a1d499725df3c1ad8cad

reorder crates to pass the format check

view details

Alexis Bourget

commit sha ba6857d801b6217a190e92e43cacd8468ff2d72a

Document the trait keyword

view details

Alex Crichton

commit sha fde8d11ca12e83fe2b07a536956f4a2725b24485

Don't pollute docs/suggestions with libstd deps Currently dependency crates of the standard library can sometimes leak into error messages such as when traits to import are suggested. Additionally they can leak into documentation such as in the list of "all traits implemented by `u32`". The dependencies of the standard library, however, are intended to be private. The dependencies of the standard library can't actually be stabl-y imported nor is the documentation that relevant since you can't import them on stable either. This commit updates both the compiler and rustdoc to ignore unstable traits in these two scenarios. Specifically the suggestion for traits to import ignore unstable traits, and similarly the list of traits implemented by a type excludes unstable traits. This commit is extracted from #73441 where the addition of some new dependencies to the standard library was showed to leak into various error messages and documentation. The intention here is to go ahead and land these changes ahead of that since it will likely take some time to land.

view details

Stefan Lankes

commit sha f9c609164251abc136eb9bda55c92cb99adb5c86

remove some compiler warnings

view details

Guillaume Gomez

commit sha 99c15133638c42253592a9bbe705ff215c9dd563

Small cleanup for E0705 explanation

view details

Trevor Spiteri

commit sha 6dfe144bdd4413ac55cbb2ad2edfb1daa0c4bf15

stabilize const_nonzero_int_methods

view details

Trevor Spiteri

commit sha 9739b512a892628534e730ffcd9756b3218c8de8

stabilize some const_checked_int_methods

view details

push time in 4 days

push eventestebank/rust

Esteban Küber

commit sha 369c2b8edbe7849d84b8c11a80962335b14f2103

Permit evaluation of assoc items on `Self` by avoiding cycle error Skip the recursive evaluation of super-traits that reference associated types on `Self` directly (without using a fully-qualified path) in order to allow its use. The following code would previously emit a cycle evaluation error and will now successfuly compile: ```rust trait Bar<T> { fn foo() -> T; } trait Foo: Bar<Self::Qux> { type Qux; } ``` The following will also work: ```rust trait Bar<T> { fn foo() -> T; } trait Baz { type Qux; } trait Foo: Bar<Self::Qux> + Baz {} ``` Fix #35237.

view details

push time in 4 days

push eventestebank/rust

Esteban Küber

commit sha 16ce81ad5aa1799dda888c6ed1492a5f490eb93c

Permit evaluation of assoc items on `Self` by avoiding cycle error Skip the recursive evaluation of super-traits that reference associated types on `Self` directly (without using a fully-qualified path) in order to allow its use. The following code would previously emit a cycle evaluation error and will now successfuly compile: ```rust trait Bar<T> { fn foo() -> T; } trait Foo: Bar<Self::Qux> { type Qux; } ``` The following will also work: ```rust trait Bar<T> { fn foo() -> T; } trait Baz { type Qux; } trait Foo: Bar<Self::Qux> + Baz {} ``` Fix #35237.

view details

push time in 4 days

push eventestebank/rust

Esteban Küber

commit sha 0bd47bc1813be69c5a646a5e1ee456f04f74ce44

Permit evaluation of assoc items on `Self` by avoiding cycle error Skip the recursive evaluation of super-traits that reference associated types on `Self` directly (without using a fully-qualified path) in order to allow its use. The following code would previously emit a cycle evaluation error and will now successfuly compile: ```rust trait Bar<T> { fn foo() -> T; } trait Foo: Bar<Self::Qux> { type Qux; } ``` The following will also work: ```rust trait Bar<T> { fn foo() -> T; } trait Baz { type Qux; } trait Foo: Bar<Self::Qux> + Baz {} ``` Fix #35237.

view details

push time in 4 days

pull request commentrust-lang/rust

Permit evaluation of assoc items on `Self` by avoiding cycle error

@nikomatsakis expanded a little bit on the documentation with some extra doc comments. Let me know if it seems like it goes into enough detail.

estebank

comment created time in 4 days

push eventestebank/rust

Philipp Krones

commit sha 32ef448bdb915f5ccb37daf7c32ad50b85c8ef0d

Rollup merge of #5756 - ebroto:5754_sort_by, r=flip1995 unnecessary_sort_by: avoid linting if key borrows changelog: Avoid linting if key borrows in [`unnecessary_sort_by`] Fixes #5754 Closes #2313

view details

Philipp Krones

commit sha 26ede3115fbaaab5aecf6ca32ab97cd0feb9f38b

Rollup merge of #5784 - matthiaskrgr:ice_5780, r=phansch Fix out of bounds access by checking length equality BEFORE accessing by index. Fixes #5780 changelog: fix out of bounds access in unnested_or_patterns lint. Edit: I did not bother reducing a testcase from `librustc_typeck` crate but I can confirm that with the change the crash no longer occurs.

view details

Philipp Krones

commit sha 314b068e2dfda364b7da178c374510fbd58129b8

Rollup merge of #5786 - matthiaskrgr:new_lint_issue_templ, r=phansch fix phrase in new_lint issue template changelog: none

view details

bors

commit sha 4b8700879c59d1673dc36ea16aff3020af23dcc5

Auto merge of #5792 - flip1995:rollup-torc1we, r=flip1995 Rollup of 5 pull requests Successful merges: - #5443 (Some accuracy lints for floating point operations) - #5752 (Move range_minus_one to pedantic) - #5756 (unnecessary_sort_by: avoid linting if key borrows) - #5784 (Fix out of bounds access by checking length equality BEFORE accessing by index.) - #5786 (fix phrase in new_lint issue template) Failed merges: r? @ghost changelog: rollup

view details

Takayuki Nakata

commit sha f2419b9d6299fb07a1163b47dc273f64e0444a6c

Refactoring to use `constant_context Use `constant_context`, `.is_str()` and `builtin_index()` to simplify.

view details

Stein Somers

commit sha 2aa3133c530b40ea0448d3c6a5507aeb40aaa558

Add and fix BTreeMap comments

view details

Lynoure Braakman

commit sha d27e7d04a15e29b093fcad97900269f408879c46

Clarify the description for rfind Changes the example code to illustrate the difference between find and rfind

view details

bjorn3

commit sha ff796b6d7082d5b5c073797aba17f454eebe3359

Rename collapsable_if fix suggestion to "collapse nested if block" The name "try" is confusing when shown as quick fix by rust-analyzer

view details

Brian Warner

commit sha 201999ccfd18a9debe1f186f30f40659ebc6b933

improve advice in iter_nth_zero The "use .next()" replacement advice is on the last line of the code snippet, where it is vulnerable to truncation. Display that advice at the beginning instead. closes #5783

view details

Takayuki Nakata

commit sha b4091032abbadf586ea8c77bc547ec2ac403ef0a

Use `.is_some()` not `Some(_)`

view details

Nicholas Nethercote

commit sha c492ca40a288d8a85353ba112c4d38fe87ef453e

Use `ArrayVec` in `SparseBitSet`. Instead of `SmallVec`, because the maximum size is known.

view details

Manish Goregaokar

commit sha aa29e3de31a2af8cb96ecc87194f5884a1b64259

Rollup merge of #73354 - XAMPPRocky:relnotes-1.45.0, r=Mark-Simulacrum Update RELEASES.md for 1.45.0 ### [Rendered](https://github.com/XAMPPRocky/rust/blob/relnotes-1.45.0/RELEASES.md) r? @Mark-Simulacrum cc @rust-lang/release

view details

Manish Goregaokar

commit sha eb7fdb2e075e703af33da0b9b48335a39e3f9097

Rollup merge of #73852 - euclio:rustdoc-attr-newlines, r=GuillaumeGomez rustdoc: insert newlines between attributes Fixes #73205.

view details

Manish Goregaokar

commit sha d9614dbe477dcc814815cd64fc8867360bdf0b4f

Rollup merge of #73867 - poliorcetics:union-keyword, r=joshtriplett Document the union keyword Partial fix of #34601. This documents the `union` keyword by presenting three cases: simply using a union, matching on a union and referencing the fields of a union. @rustbot modify labels: T-doc,C-enhancement

view details

Manish Goregaokar

commit sha e5532436a19ec421ec0d510df3428f9517c31d0a

Rollup merge of #74046 - ehuss:deny-warnings-caching, r=Mark-Simulacrum Fix caching issue when building tools. This fixes a problem with tool builds not being cached properly. #73297 changed it so that Clippy will participate in the "deny warnings" setting. Unfortunately this causes a problem because Clippy shares the build directory with other tools which do not participate in "deny warnings". Because Cargo does not independently cache artifacts based on different RUSTFLAGS settings, it causes all the shared dependencies to get rebuilt if Clippy ever gets built. The solution here is to stop using RUSTFLAGS, and just sneak the settings in through the rustc wrapper. Cargo won't know about the different settings, so it will not bust the cache. This should be safe since lint settings on dependencies are ignored. This is how things used to work in the past before #64316. Alternate solutions: * Treat Clippy as a "submodule" and don't enforce warnings on it. This was the behavior before #73297. The consequence is that if a warning sneaks into clippy, that the clippy maintainers will need to fix it when they sync clippy back to the clippy repo. * Just deny warnings on all tools (removing the in-tree/submodule distinction). This is tempting, but with some issues (cc #52336): * Adding or changing warnings in rustc can be difficult to land because tools have to be updated if they trip the warning. In practice, this isn't too bad. Cargo (and rustfmt) already runs with `deny(warnings)`, so this has been the de-facto standard already (although they do not use the extra lints like `unused_lifetimes`). * Teach Cargo to add flags to the workspace members, but not dependencies. * Teach Cargo to add flags without fingerprinting them? * Teach Cargo to independently cache different RUSTFLAGS artifacts (this was [reverted](https://github.com/rust-lang/cargo/pull/7417) due to complications). This would also unnecessarily rebuild dependencies, but would avoid cache thrashing. * Teach Cargo about lint settings. Closes #74016

view details

Manish Goregaokar

commit sha 549aa03d862d45f5c33fae2ea2a2d2d537207bda

Rollup merge of #74123 - GuillaumeGomez:cleanup-e0718, r=pickfire clean up E0718 explanation r? @Dylan-DPC

view details

Manish Goregaokar

commit sha e4a9b361267b1bcd9ead320f19ef15a6fa4e48f2

Rollup merge of #74147 - dennis-hamester:fix/issue-74134, r=jyn514 rustdoc: Allow linking from private items to private types Fixes #74134 After PR #72771 this would trigger an intra_doc_link_resolution_failure warning when rustdoc is invoked without --document-private-items. Links from private items to private types are however never actually generated in that case and thus shouldn't produce a warning. These links are in fact a very useful tool to document crate internals. Tests are added for all 4 combinations of public/private items and link targets. Test 1 is the case mentioned above and fails without this commit. Tests 2 - 4 passed before already but are added nonetheless to prevent regressions.

view details

Manish Goregaokar

commit sha fa4ada1a862f6ba0a2953e899f472cc358de3533

Rollup merge of #74285 - wangtheo:issue-71669, r=lcnr #71669: add ui, codegen tests for volatile + nearby int intrinsics Added some tests for intrinsics. See https://github.com/rust-lang/rust/issues/71669.

view details

Manish Goregaokar

commit sha 9a1df31d5581811516874f24a2896ba682422bcc

Rollup merge of #74286 - PankajChaudhary5:E0688, r=GuillaumeGomez Added detailed error code explanation for issue E0688 in Rust compiler. Added proper error explanation for issue E0688 in the Rust compiler. Error Code E0688 Sub Part of Issue #61137 r? @GuillaumeGomez

view details

bors

commit sha 4a689da944977496fb758cc2d700984cc6a10b7f

Auto merge of #74313 - Manishearth:rollup-b55rn6t, r=Manishearth Rollup of 8 pull requests Successful merges: - #73354 (Update RELEASES.md for 1.45.0) - #73852 (rustdoc: insert newlines between attributes) - #73867 (Document the union keyword) - #74046 (Fix caching issue when building tools.) - #74123 (clean up E0718 explanation) - #74147 (rustdoc: Allow linking from private items to private types) - #74285 (#71669: add ui, codegen tests for volatile + nearby int intrinsics) - #74286 (Added detailed error code explanation for issue E0688 in Rust compiler.) Failed merges: r? @ghost

view details

push time in 4 days

push eventestebank/rust

Esteban Küber

commit sha 49b74f7b5407cdaa16d418622e3f7594d0746885

Use `inherit` to explicitly propagate `stable` attrs

view details

push time in 4 days

Pull request review commentrust-lang/rust

[WIP] Fix regionck failure when converting Index to IndexMut

 impl IndexMut<u32> for H { }  fn main() {-    H["?"].f(); //~ ERROR mismatched types+    H["?"].f();+    //~^ ERROR mismatched types+    //~| ERROR mismatched types

It'd be nice to not cause this duplication of errors, but that's less important than the regression.

Instead of demand_coerce you could use demand_coerce_diag to be able to map_err it and .delay_span_bug() it. I think that would be enough, but we should probably not include that in a backport.

nbdd0121

comment created time in 5 days

pull request commentrust-lang/rust

Presort restrictions to make output consistent

@bors r+ rollup

JohnTitor

comment created time in 5 days

pull request commentrust-lang/rust

Inherit `#[stable(..)]` annotations in enum variants and fields from its item

What is the right time to use the inherit attribute?

Whenever you want to opt-into the new behavior on ADTs. My thinking is that having that new attribute present in the ADT would make it more obvious to someone adding a new field/variant not to forget to add an #[unstable] attribute to them. I also think this behavior should be the default, but I understand why others disagree.

estebank

comment created time in 5 days

pull request commentrust-lang/rust

Inherit `#[stable(..)]` annotations in enum variants and fields from its item

Rebased on top of recent master and added new inherit attribute to explicitly propagate the stable attr to its fields/variants.

estebank

comment created time in 5 days

push eventestebank/rust

Philipp Krones

commit sha 26ede3115fbaaab5aecf6ca32ab97cd0feb9f38b

Rollup merge of #5784 - matthiaskrgr:ice_5780, r=phansch Fix out of bounds access by checking length equality BEFORE accessing by index. Fixes #5780 changelog: fix out of bounds access in unnested_or_patterns lint. Edit: I did not bother reducing a testcase from `librustc_typeck` crate but I can confirm that with the change the crash no longer occurs.

view details

Philipp Krones

commit sha 314b068e2dfda364b7da178c374510fbd58129b8

Rollup merge of #5786 - matthiaskrgr:new_lint_issue_templ, r=phansch fix phrase in new_lint issue template changelog: none

view details

bors

commit sha 4b8700879c59d1673dc36ea16aff3020af23dcc5

Auto merge of #5792 - flip1995:rollup-torc1we, r=flip1995 Rollup of 5 pull requests Successful merges: - #5443 (Some accuracy lints for floating point operations) - #5752 (Move range_minus_one to pedantic) - #5756 (unnecessary_sort_by: avoid linting if key borrows) - #5784 (Fix out of bounds access by checking length equality BEFORE accessing by index.) - #5786 (fix phrase in new_lint issue template) Failed merges: r? @ghost changelog: rollup

view details

Takayuki Nakata

commit sha f2419b9d6299fb07a1163b47dc273f64e0444a6c

Refactoring to use `constant_context Use `constant_context`, `.is_str()` and `builtin_index()` to simplify.

view details

Stein Somers

commit sha 2aa3133c530b40ea0448d3c6a5507aeb40aaa558

Add and fix BTreeMap comments

view details

Lynoure Braakman

commit sha d27e7d04a15e29b093fcad97900269f408879c46

Clarify the description for rfind Changes the example code to illustrate the difference between find and rfind

view details

bjorn3

commit sha ff796b6d7082d5b5c073797aba17f454eebe3359

Rename collapsable_if fix suggestion to "collapse nested if block" The name "try" is confusing when shown as quick fix by rust-analyzer

view details

Brian Warner

commit sha 201999ccfd18a9debe1f186f30f40659ebc6b933

improve advice in iter_nth_zero The "use .next()" replacement advice is on the last line of the code snippet, where it is vulnerable to truncation. Display that advice at the beginning instead. closes #5783

view details

Takayuki Nakata

commit sha b4091032abbadf586ea8c77bc547ec2ac403ef0a

Use `.is_some()` not `Some(_)`

view details

Nicholas Nethercote

commit sha c492ca40a288d8a85353ba112c4d38fe87ef453e

Use `ArrayVec` in `SparseBitSet`. Instead of `SmallVec`, because the maximum size is known.

view details

Manish Goregaokar

commit sha aa29e3de31a2af8cb96ecc87194f5884a1b64259

Rollup merge of #73354 - XAMPPRocky:relnotes-1.45.0, r=Mark-Simulacrum Update RELEASES.md for 1.45.0 ### [Rendered](https://github.com/XAMPPRocky/rust/blob/relnotes-1.45.0/RELEASES.md) r? @Mark-Simulacrum cc @rust-lang/release

view details

Manish Goregaokar

commit sha eb7fdb2e075e703af33da0b9b48335a39e3f9097

Rollup merge of #73852 - euclio:rustdoc-attr-newlines, r=GuillaumeGomez rustdoc: insert newlines between attributes Fixes #73205.

view details

Manish Goregaokar

commit sha d9614dbe477dcc814815cd64fc8867360bdf0b4f

Rollup merge of #73867 - poliorcetics:union-keyword, r=joshtriplett Document the union keyword Partial fix of #34601. This documents the `union` keyword by presenting three cases: simply using a union, matching on a union and referencing the fields of a union. @rustbot modify labels: T-doc,C-enhancement

view details

Manish Goregaokar

commit sha e5532436a19ec421ec0d510df3428f9517c31d0a

Rollup merge of #74046 - ehuss:deny-warnings-caching, r=Mark-Simulacrum Fix caching issue when building tools. This fixes a problem with tool builds not being cached properly. #73297 changed it so that Clippy will participate in the "deny warnings" setting. Unfortunately this causes a problem because Clippy shares the build directory with other tools which do not participate in "deny warnings". Because Cargo does not independently cache artifacts based on different RUSTFLAGS settings, it causes all the shared dependencies to get rebuilt if Clippy ever gets built. The solution here is to stop using RUSTFLAGS, and just sneak the settings in through the rustc wrapper. Cargo won't know about the different settings, so it will not bust the cache. This should be safe since lint settings on dependencies are ignored. This is how things used to work in the past before #64316. Alternate solutions: * Treat Clippy as a "submodule" and don't enforce warnings on it. This was the behavior before #73297. The consequence is that if a warning sneaks into clippy, that the clippy maintainers will need to fix it when they sync clippy back to the clippy repo. * Just deny warnings on all tools (removing the in-tree/submodule distinction). This is tempting, but with some issues (cc #52336): * Adding or changing warnings in rustc can be difficult to land because tools have to be updated if they trip the warning. In practice, this isn't too bad. Cargo (and rustfmt) already runs with `deny(warnings)`, so this has been the de-facto standard already (although they do not use the extra lints like `unused_lifetimes`). * Teach Cargo to add flags to the workspace members, but not dependencies. * Teach Cargo to add flags without fingerprinting them? * Teach Cargo to independently cache different RUSTFLAGS artifacts (this was [reverted](https://github.com/rust-lang/cargo/pull/7417) due to complications). This would also unnecessarily rebuild dependencies, but would avoid cache thrashing. * Teach Cargo about lint settings. Closes #74016

view details

Manish Goregaokar

commit sha 549aa03d862d45f5c33fae2ea2a2d2d537207bda

Rollup merge of #74123 - GuillaumeGomez:cleanup-e0718, r=pickfire clean up E0718 explanation r? @Dylan-DPC

view details

Manish Goregaokar

commit sha e4a9b361267b1bcd9ead320f19ef15a6fa4e48f2

Rollup merge of #74147 - dennis-hamester:fix/issue-74134, r=jyn514 rustdoc: Allow linking from private items to private types Fixes #74134 After PR #72771 this would trigger an intra_doc_link_resolution_failure warning when rustdoc is invoked without --document-private-items. Links from private items to private types are however never actually generated in that case and thus shouldn't produce a warning. These links are in fact a very useful tool to document crate internals. Tests are added for all 4 combinations of public/private items and link targets. Test 1 is the case mentioned above and fails without this commit. Tests 2 - 4 passed before already but are added nonetheless to prevent regressions.

view details

Manish Goregaokar

commit sha fa4ada1a862f6ba0a2953e899f472cc358de3533

Rollup merge of #74285 - wangtheo:issue-71669, r=lcnr #71669: add ui, codegen tests for volatile + nearby int intrinsics Added some tests for intrinsics. See https://github.com/rust-lang/rust/issues/71669.

view details

Manish Goregaokar

commit sha 9a1df31d5581811516874f24a2896ba682422bcc

Rollup merge of #74286 - PankajChaudhary5:E0688, r=GuillaumeGomez Added detailed error code explanation for issue E0688 in Rust compiler. Added proper error explanation for issue E0688 in the Rust compiler. Error Code E0688 Sub Part of Issue #61137 r? @GuillaumeGomez

view details

bors

commit sha 4a689da944977496fb758cc2d700984cc6a10b7f

Auto merge of #74313 - Manishearth:rollup-b55rn6t, r=Manishearth Rollup of 8 pull requests Successful merges: - #73354 (Update RELEASES.md for 1.45.0) - #73852 (rustdoc: insert newlines between attributes) - #73867 (Document the union keyword) - #74046 (Fix caching issue when building tools.) - #74123 (clean up E0718 explanation) - #74147 (rustdoc: Allow linking from private items to private types) - #74285 (#71669: add ui, codegen tests for volatile + nearby int intrinsics) - #74286 (Added detailed error code explanation for issue E0688 in Rust compiler.) Failed merges: r? @ghost

view details

Michael Wright

commit sha d067d0352bfc5a6979f477bc96c969b040437618

Add test for `needless_range_loop` issue Closes #2277 This was fixed when we fixed #2542.

view details

push time in 5 days

pull request commentrust-lang/rust

rustc: Ignore fs::canonicalize errors in metadata

r? @Mark-Simulacrum

alexcrichton

comment created time in 5 days

pull request commentrust-lang/rust

Perform WF-check on `type`s with no type parameters

@nikomatsakis that seems reasonable to me, if quite a bit of work.

  • Do not WF-check types with type parameters because we currently lint against type T<X: Trait> = K<X>; because we do not propagate X: Trait, which means that we currently allow type T<X> = <X as Trait>::Foo;, which would be rejected if we WF-checked it because it would need to be written as type T<X: Trait> = <X as Trait>::Foo; to be correct.

What should be done about this point? We currently lint against because we don't check or propagate those bounds. I would want us to stop linting against and try to flip the behavior for all types, including those with type parameters, to perform WF-check in 2021.

estebank

comment created time in 5 days

issue commentrust-lang/rust

Small program causes internal compiler error on rustc 1.45.0

1.44 doesn't have the ICE.

jesperdj

comment created time in 6 days

startedemilk/emigui

started time in 6 days

pull request commentrust-lang/rust

Inherit `#[stable(..)]` annotations in enum variants and fields from its item

@nikomatsakis correct.

We could also change this to be something like #[stable(feature = "rust1", since = "1.0.0", propagate)] so it is opt-in instead of implicit.

estebank

comment created time in 6 days

startedaalhour/awesome-compilers

started time in 7 days

startedrobinsloan/perfect-edition

started time in 7 days

issue commentrust-lang/rust

some ui tests print traits differently on big-endian

For the suggestion in missing-trait-bounds-for-method-call.rs we can presort the restrictions so that the output is always consistent.

infinity0

comment created time in 7 days

issue openedrust-lang/rust

When encountering E0106 for trait object, do not also emit E0288

Given:

use std::fmt::Display;

fn foo(x: bool) -> &dyn Display {
    &""
}

we currently emit two errors:

error[E0106]: missing lifetime specifier
 --> file.rs:3:20
  |
3 | fn foo(x: bool) -> &dyn Display {
  |                    ^ expected named lifetime parameter
  |
  = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments
help: consider using the `'static` lifetime
  |
3 | fn foo(x: bool) -> &'static dyn Display {
  |                    ^^^^^^^^

error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound
 --> file.rs:3:21
  |
3 | fn foo(x: bool) -> &dyn Display {
  |                     ^^^^^^^^^^^

We should not be emitting E0288 here as it is redundant.

created time in 7 days

pull request commentrust-lang/rust

Inherit `#[stable(..)]` annotations in enum variants and fields from its item

I don't think we reached a concensus. People were against it to avoid issues, I was for it due to the diagnostics.

An alternative we could have is to add a flag to the stable annotations to actively enable the cascading, but keep the default the same as now.

estebank

comment created time in 8 days

startedther0n/UnnaturalScrollWheels

started time in 8 days

starteddandavison/delta

started time in 9 days

startedjan-warchol/selenized

started time in 9 days

issue commentrust-lang/rust

Proposal: Mismatching parameter name lint

@rickvanprim not exactly. I'm staying that there should be a way to annotate the traits fns opting into this lint. An allowed by default lint would otherwise be triggered by every impl once enabled.

rickvanprim

comment created time in 9 days

issue commentrust-lang/rust

Proposal: Mismatching parameter name lint

This seems like it would have to be somehow opt in, in the same way that #[must_use] is opt in.

rickvanprim

comment created time in 9 days

issue openedrust-lang/rust

Filter out `Debug` note on E0277 in type context

Given

trait T {
    type A: Display;
}

impl T for () {
    type A = ();
}

we shouldn't include the last note as that is only useful when dealing with expressions:

error[E0277]: `()` doesn't implement `std::fmt::Display`
 --> src/lib.rs:8:14
  |
3 | trait T {
  |       - required by a bound in this
4 |     type A: Display;
  |             ------- required by this bound in `T`
...
8 |     type A = ();
  |              ^^ `()` cannot be formatted with the default formatter
  |
  = help: the trait `std::fmt::Display` is not implemented for `()`
  = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead

created time in 10 days

Pull request review commentrust-lang/rust

Separate projection bounds and predicates

 error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied-  --> $DIR/defaults-suitability.rs:15:14+  --> $DIR/defaults-suitability.rs:13:5    |-LL | trait Tr {-   | -------- required by `Tr` LL |     type Ty: Clone = NotClone;-   |              ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone`+   |     ^^^^^^^^^-----^^^^^^^^^^^^+   |     |        |+   |     |        required by this bound in `Tr::Ty`+   |     the trait `std::clone::Clone` is not implemented for `NotClone`

Could we change the span to only point at NotClone?

matthewjasper

comment created time in 10 days

Pull request review commentrust-lang/rust

Separate projection bounds and predicates

 impl<'a, 'b> Lam<&'a &'b u8> for L2 { type App = u8; }  trait Case1 {     type A: Iterator<Item: Debug>;+    //~^ ERROR `<<Self as Case1>::A as std::iter::Iterator>::Item` doesn't implement `std::fmt::Debug`

Isn't this technically a regression? (For the same reason https://github.com/rust-lang/rust/pull/69741 might not land.)

matthewjasper

comment created time in 10 days

pull request commentrust-lang/rust

Use the proper span when WF-checking an impl self type

@bors r+ rollup

Aaron1011

comment created time in 10 days

startedrudolfschmidt/acc

started time in 10 days

pull request commentrust-lang/rust

Gate if-let guard feature

I guess we have to accept this fate and fallback to previous parse_expr.

Shame. We could maybe change that in 2021?

lzutao

comment created time in 11 days

pull request commentrust-lang/rust

fixed error reporting for mismatched traits

@bors r+

ayrtonm

comment created time in 12 days

pull request commentrust-lang/rust

Fix ICE while building MIR with type errors

I would assume that the ICE tickets were closed with tests, so if the test suite is passing it should be safe to remove it.

tmandry

comment created time in 12 days

pull request commentrust-lang/rust

Refactor `region_name`: add `RegionNameHighlight`

@bors r+

These look like they will be quite useful. Really glad to see these changes.

SNCPlay42

comment created time in 12 days

push eventestebank/rust

Esteban Küber

commit sha d090e5ed3327a24c17754be7e224b5f2345aa622

Account for trailing closing angle brackets

view details

push time in 12 days

pull request commentrust-lang/rust

fixed error reporting for mismatched traits

r? @estebank

ayrtonm

comment created time in 12 days

pull request commentrust-lang/rust

fixed error reporting for mismatched traits

Neat solution!

Could we add a test or two exercising the new behavior? It can be just including the case from the original report.

ayrtonm

comment created time in 12 days

issue commentrust-lang/rust

Improved error message when forgetting to specify default type parameter

Current output:

error[E0308]: mismatched types
 --> src/lib.rs:8:20
  |
7 | fn bar<T>(foo: Foo) {
  |        - this type parameter
8 |     let value: T = foo.get();
  |                -   ^^^^^^^^^ expected type parameter `T`, found `u32`
  |                |
  |                expected due to this
  |
  = note: expected type parameter `T`
                       found type `u32`
Lehona

comment created time in 12 days

pull request commentrust-lang/rust

Inherit `#[stable(..)]` annotations in enum variants and fields from its item

Cc https://github.com/rust-lang/rust/issues/74673

estebank

comment created time in 12 days

issue commentrust-lang/rust

Type mismatch mentioning trait as type

I believe they can be just "trait".

lcnr

comment created time in 12 days

Pull request review commentrust-lang/rust

delay_span_bug instead of silent ignore

 impl<'a, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {             match pat.kind {                 // In tuple struct patterns ignore the invalid `ident @ ...`.                 // It will be handled as an error by the AST lowering.

This comment should have gone with the delay_span_bug :)

Mark-Simulacrum

comment created time in 12 days

issue commentrust-lang/rust

Type mismatch mentioning trait as type

@ayrtonm do not hesitate to reach out if you need help!

lcnr

comment created time in 12 days

PR opened rust-lang/rust

Detect turbofish missing surrounding angle brackets

Fix #74065.

+61 -3

0 comment

5 changed files

pr created time in 12 days

push eventestebank/rust

Esteban Küber

commit sha 20f4e5d9c24809031fd6631436f0a7a5b075fe40

Detect turbofish missing surrounding angle brackets

view details

push time in 12 days

create barnchestebank/rust

branch : bracketless-turbofish

created branch time in 12 days

issue commentrust-lang/rust

Consider allowing trailing comma in struct update syntax

The entire file is underlined because of E0601, not because of the trailing comma. If you add a main function the underline will be way more useful. An option would be for E0601 to only point at the beginning or end of the file.

Veetaha

comment created time in 13 days

startedByron/dua-cli

started time in 13 days

pull request commentrust-lang/rust

Detect when `'static` obligation might come from an `impl`

@bors r=nikomatsakis

estebank

comment created time in 13 days

push eventestebank/rust

Caio

commit sha 187aea7c34adf06b0db39f688d60d3fdac8e7e3e

Impl Default for ranges

view details

Jamie Cunliffe

commit sha fc52b47e8013da325fc0a0f5d3897143243ba206

va_args implementation for AAPCS. Implement the va args in codegen for AAPCS, this will be used as the default va_args implementation for AArch64 rather than the va_args llvm-ir as it currently is. Copyright (c) 2020, Arm Limited.

view details

Dan Gohman

commit sha 83bd3d3975bd56e0bd959b5df8129e4ee21aeca3

Add `RawFd` to WASI's `std::os::wasi::prelude`. Add `RawFd` to WASI's `std::os::wasi::prelude`, making it consistent with all other platforms which also have `AsRawFd`, `FromRawFd`, and `IntoRawFd` in their respective preludes.

view details

Caio

commit sha c3756927478afe8d3a880edc469afd766c2f9e82

Remove some Default impls

view details

Andrew Paverd

commit sha 31c7aae1136b4d80f0256e269ca8086fd3fbdddd

Stabilize control-flow-guard codegen option

view details

Bastian Kauschke

commit sha 5300ca38d88b924f7108274c50d918728c53aecd

cleanup ty_is_~non~_local_constructor

view details

Bastian Kauschke

commit sha 1ac3713f256dd379d8fe24b09bc8ba6643ea41b4

refactor ty_is_non_local

view details

Yuki Okushi

commit sha a11024f4f312a49db84d816bf43c7c55d8a21074

Fix debug assertion in typeck

view details

Bastian Kauschke

commit sha e8d16fdf9f95e4110df53650779be842b6749f60

add note to `opt_const_param_of`

view details

Lzu Tao

commit sha 174abeb6cb9553bae0a59fbf0aba186da300d390

Add an border around the Run button

view details

Jarek Samic

commit sha dec70767e533a4603baafb4c209ac3b90bba79f7

Fix search input focus in ayu theme

view details

Lzu Tao

commit sha 0eff3d5d886a2290b4557a4438efe8a6aa6cfba7

Ayu: use different background color to make Run button easy-to-spot Co-authored-by: Cldfire <cldfire@3grid.net>

view details

Lzu Tao

commit sha cfa3a330149b78c4d827b10d9ac4ff8d381e7342

compiletest: Rewrite extract_lldb_version function This makes extract_lldb_version has the same version type like extract_gdb_version. This is technically a breaking change for rustc-dev users. But note that rustc-dev is a nightly component.

view details

Lzu Tao

commit sha d778f326c385b2df7053b84fb5e3f89361b5fc3a

compiletest: Rewrite extract_gdb_version function

view details

Lzu Tao

commit sha 07d56cba8ffd854f1c8b91bb1372130e5abe6169

Fix panic as passing wrong format to `extract_gdb_version`

view details

Lzu Tao

commit sha 79d5cbbf867a888000b8bbd47194bc57b343b72a

Use Option::as_deref

view details

Lzu Tao

commit sha 75caee076d41eca5163a4094e44ce6d48f6b4f1b

Extract closure to function

view details

Lzu Tao

commit sha 5aa33b11fc88d0f81c7b2dc586db1439fcf2b664

Use subslice pattern

view details

Lzu Tao

commit sha 5e5d8163233df1421925c7351377ade2306742de

Add missing : after min-gdb-version

view details

Lzu Tao

commit sha 2bcefa8d81fdf46f8ad9d893d271788477ccf95b

Add missing : after *llvm-version

view details

push time in 13 days

pull request commentrust-lang/rust

Correctly parse `{} && false` in tail expression

r? @eddyb

estebank

comment created time in 13 days

PR opened rust-lang/rust

Correctly parse `{} && false` in tail expression

Fix #74233, fix #54186.

+63 -25

0 comment

9 changed files

pr created time in 13 days

create barnchestebank/rust

branch : ambiguous-expr-binop

created branch time in 13 days

pull request commentrust-lang/rust

Rollup of 10 pull requests

It was #73783 not having fixed an nll test (which I didn't expect).

Manishearth

comment created time in 13 days

issue commentrust-lang/rust

Two consecutive if lets cannot be used as function result

Reopening because I'm reverting the change that fixed it because of https://github.com/rust-lang/rust/issues/74233.

hellow554

comment created time in 13 days

pull request commentrust-lang/rust

Do not ICE on assoc type with bad placeholder

@bors r+

JohnTitor

comment created time in 13 days

pull request commentrust-lang/rust

Gate if-let guard feature

LGTM, letting @eddyb have final r+.

lzutao

comment created time in 14 days

pull request commentrust-lang/rust

[mir-opt] Allow debuginfo to be generated for a constant or a Place

r? @oli-obk

wesleywiser

comment created time in 14 days

startedferrous-systems/embedded-trainings-2020

started time in 14 days

issue openedrust-lang/rust

Provide suggestion when argument that should be a closure is any other type

Given

fn foo() -> Result<(), ()> {
    Ok(bar().map_err(())?)
}

we currently emit

error[E0277]: expected a `std::ops::FnOnce<((),)>` closure, found `()`
 --> src/main.rs:2:22
  |
2 |     Ok(bar().map_err(())?)
  |                      ^^ expected an `FnOnce<((),)>` closure, found `()`
  |
  = help: the trait `std::ops::FnOnce<((),)>` is not implemented for `()`

We already keep track of whether we're pointing at an argument.When the expectation is of a closure we should probably provide a suggestion along the lines of

error[E0277]: expected a `std::ops::FnOnce<((),)>` closure, found `()`
 --> src/main.rs:2:22
  |
2 |     Ok(bar().map_err(())?)
  |                      ^^ expected an `FnOnce<((),)>` closure, found `()`
  |
help: provide a closure instead:
  |
2 |     Ok(bar().map_err(|_| ())?)
  |                      ^^^^

Taken from https://www.reddit.com/r/rust/comments/hv657u/question_mark_usage/

created time in 14 days

pull request commentrust-lang/rust

Detect when `'static` obligation might come from an `impl`

@bors r=nikomatsakis

estebank

comment created time in 14 days

push eventestebank/rust

Esteban Küber

commit sha 7b05fb504194652b1d550babfce403fa11454233

Change error code number

view details

push time in 14 days

push eventestebank/rust

Esteban Küber

commit sha 0aabe8192f5ba5abe73c77b039c273eab885aca3

Change error code number

view details

push time in 14 days

startedNerdyPepper/dijo

started time in 15 days

push eventestebank/rust

Esteban Küber

commit sha cd49e69e8c395ecf844f98cbb631383e136aca9a

Change error code number

view details

push time in 15 days

pull request commentrust-lang/rust

Deduplicate `::` -> `:` typo errors

Rebased onto a single commit.

estebank

comment created time in 15 days

push eventestebank/rust

Esteban Küber

commit sha e57f0e27f90ed78a180a12465df8421655886337

Change error code number

view details

push time in 15 days

push eventestebank/rust

Tshepang Lekhonkhobe

commit sha f3645ca6ca39bd891af3f0bd82b81f9a13718f6c

remove rustdoc warnings

view details

Ralf Jung

commit sha 2d9ed15c070cda189e2715eedc887b0e51de0233

update Miri

view details

Poliorcetics

commit sha 614f7738ba65ac37f2dc61afa8c68fc3768fdffc

Clarify some parts by applying the suggestions from review Co-authored-by: Josh Triplett <josh@joshtriplett.org>

view details

Oliver Scherer

commit sha 7e682d3f6f5761471e05fefc21e5de6ce4a52444

Stabilize casts and coercions to `&[T]` in const fn

view details

Dodo

commit sha a065096ff40f7910fd58aa36a76be6cb1c5f1d4d

stabilize const mem::forget

view details

bors

commit sha e070765f6e6c1035c7c728be486e7e69cb2b4808

Auto merge of #73888 - RalfJung:miri, r=RalfJung update Miri Fixes https://github.com/rust-lang/rust/issues/73773 Cc @rust-lang/miri r? @ghost

view details

Guillaume Gomez

commit sha f74a7d3ff1a080f4877a43096985b693d5949f55

Clean up E0712 explanation

view details

flip1995

commit sha 1e861a2663fc970bc0530535020b4eb62fca257f

Merge remote-tracking branch 'upstream/master' into rustup2

view details

flip1995

commit sha ab649c920e18929c8f2b3399178bcfd1ecdcdd3e

Disable chrono integration test

view details

bors

commit sha ccf7cb3764728b26f5ccc0d7b3754f0c49319af3

Auto merge of #5751 - flip1995:rustup, r=Manishearth,flip1995 Rustup cc https://github.com/rust-lang/rust/pull/73743 r? @Manishearth changelog: none

view details

LeSeulArtichaut

commit sha 8ee1dec77b89d6341a147d91af8733f8e0b5efc7

Deny unsafe ops in unsafe fns, part 1

view details

LeSeulArtichaut

commit sha 8a515e963cf2711192495802d7bbf2e49979cdf2

Deny unsafe ops in unsafe fns, part 2

view details

LeSeulArtichaut

commit sha ac7539c6d1036e42e84d388a57a656c420cb9eee

Deny unsafe ops in unsafe fns, part 3

view details

LeSeulArtichaut

commit sha c68f478131a94f5a69d91db1af35cb506f673ec2

Deny unsafe ops in unsafe fns, part 4

view details

Eric Huss

commit sha c225e5c5cb1200f46b83752e160b489eba1cd597

Provide more information on duplicate lang item error.

view details

LeSeulArtichaut

commit sha b3652337a9539e703682a6babbf816192760bd3d

Deny unsafe ops in unsafe fns, part 5

view details

bors

commit sha 16957bd4d3a5377263f76ed74c572aad8e4b7e59

Auto merge of #73456 - tmiasko:musl-libdir, r=Mark-Simulacrum bootstrap: Configurable musl libdir Make it possible to customize the location of musl libdir using musl-libdir in config.toml, e.g., to use lib64 instead of lib.

view details

Eric Huss

commit sha 1b3ef660261c880783db0154b89c09a1c4608845

Switch crate_extern_paths to a query, and tweak wording.

view details

LeSeulArtichaut

commit sha a1623ff3b6a48e7ac29e1c25900989851278743b

Deny unsafe ops in unsafe fns, part 6 And final part!!!

view details

Dylan MacKenzie

commit sha ca8678b23e5f49c65da1e0d2aa01d3fa0d5178e9

Handle inactive enum variants in `MaybeUninitializedPlaces`

view details

push time in 15 days

push eventestebank/rust

Esteban Küber

commit sha 995825642e53f4bf9c546ad439ec2b88ad08ef87

Reduce verbosity of some type ascription errors * Deduplicate type ascription LHS errors * Remove duplicated `:` -> `::` suggestion from parse error * Tweak wording to be more accurate * Modify `current_type_ascription` to reduce span wrangling * remove now unnecessary match arm * Add run-rustfix to appropriate tests

view details

push time in 15 days

push eventestebank/rust

Esteban Küber

commit sha aa8598a860fc777199181bd7e4a34c3470d7436e

Reduce verbosity of some type ascription errors * Deduplicate type ascription LHS errors * Remove duplicated `:` -> `::` suggestion from parse error * Tweak wording to be more accurate * Modify `current_type_ascription` to reduce span wrangling * remove now unnecessary match arm * Add run-rustfix to appropriate tests

view details

push time in 15 days

pull request commentrust-lang/rust

Gate if-let guard feature

tidy error: Found 1 features without a gate test.
Expected a gate test for the feature 'if_let_guard'.
Hint: create a failing test file named 'feature-gate-if_let_guard.rs'
      in the 'ui' test suite, with its failures due to
      missing usage of `#![feature(if_let_guard)]`.
Hint: If you already have such a test and don't want to rename it,
      you can also add a // gate-test-if_let_guard line to the test file.
lzutao

comment created time in 15 days

pull request commentrust-lang/rust

Optimize away BitAnd and BitOr when possible

@xldenis can you try rebasing on top of a recent master? This doesn't seem like something caused by your PR and doing that might be enough to get CI to pass. Otherwise you might be introducing a bug in this PR and it's triggered in crossbeam-utils (this is happening in stage1, not stage0, so it's using the new code).

xldenis

comment created time in 15 days

Pull request review commentrust-lang/rust

Fix an ICE on an invalid `binding @ ...` in a tuple struct pattern

 impl<'a, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {         pat_src: PatternSource,         bindings: &mut SmallVec<[(PatBoundCtx, FxHashSet<Ident>); 1]>,     ) {+        let is_tuple_struct_pat = matches!(pat.kind, PatKind::TupleStruct(_, _));+         // Visit all direct subpatterns of this pattern.         pat.walk(&mut |pat| {             debug!("resolve_pattern pat={:?} node={:?}", pat, pat.kind);             match pat.kind {-                PatKind::Ident(bmode, ident, ref sub) => {+                // In tuple struct patterns ignore the invalid `ident @ ...`.+                // It will be handled as an error by the AST lowering.+                PatKind::Ident(bmode, ident, ref sub)+                    if !(is_tuple_struct_pat && sub.as_ref().filter(|p| p.is_rest()).is_some()) =>+                {

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.)

jakubadamw

comment created time in 15 days

startedgalvez/fast-vue-ssr

started time in 16 days

startedmstange/perfrecord

started time in 16 days

pull request commentrust-lang/rust

Optimize away BitAnd and BitOr when possible

The code looks fine but I can't take a good look right now. r? @oli-obk for final review.

xldenis

comment created time in 16 days

startedrust-console/cargo-n64

started time in 18 days

pull request commentrust-lang/rust

Deduplicate `::` -> `:` typo errors

I'm offline until Monday, but can do so then. Should I rebase to single commit or into smaller logical changes?

estebank

comment created time in 18 days

pull request commentrust-lang/rust

improper_ctypes_definitions: allow `Box`

R=me when green

davidtwco

comment created time in 18 days

IssuesEvent

pull request commentrust-lang/rust

Add a Game Boy Advance target

I won't be online in the short term, can you take over r? @jonas-schievink (or delegate to someone else)?

Lokathor

comment created time in 19 days

Pull request review commentrust-lang/rust

Deduplicate `::` -> `:` typo errors

 LL |     let _ = Option:Some(vec![0, 1]);    = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error+error: expected `::`, found `:`+  --> $DIR/issue-47666.rs:7:16+   |+LL |     let _ = Foo:A;+   |                ^ help: write a path separator instead: `::`+

For reference, this is the current output:

error: expected type, found `2`
 --> src/main.rs:6:19
  |
6 |     let _ = Foo:B(2); //~ ERROR expected type
  |                -  ^ expected type
  |                |
  |                help: maybe write a path separator here: `::`
  |
  = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`

error: expected one of `!`, `(`, `.`, `::`, `;`, `<`, or `?`, found `{`
 --> src/main.rs:9:19
  |
9 |     let _ = Foo:C { x: 1 }; //~ ERROR expected one of
  |                -  ^ expected one of 7 possible tokens
  |                |
  |                help: maybe write a path separator here: `::`
  |
  = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`

error: expected type, found reserved keyword `box`
 --> src/main.rs:2:25
  |
2 |     let _ = Option:Some(vec![0, 1]); //~ ERROR expected type, found
  |                   -     ^^^^^^^^^^
  |                   |     |
  |                   |     expected type
  |                   |     in this macro invocation
  |                   |     this macro call doesn't expand to a type
  |                   help: maybe write a path separator here: `::`
  |
  = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
  = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0423]: expected value, found enum `Option`
 --> src/main.rs:2:13
  |
2 |     let _ = Option:Some(vec![0, 1]); //~ ERROR expected type, found
  |             ^^^^^^
  |
help: try using one of the enum's variants
  |
2 |     let _ = std::option::Option::None:Some(vec![0, 1]); //~ ERROR expected type, found
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^
2 |     let _ = std::option::Option::Some:Some(vec![0, 1]); //~ ERROR expected type, found
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider importing one of these items instead
  |
1 | use serde::de::Unexpected::Option;
  |
1 | use serde_value::Unexpected::Option;
  |
1 | use serde_value::Value::Option;
  |

error[E0573]: expected type, found variant `Some`
 --> src/main.rs:2:20
  |
2 |     let _ = Option:Some(vec![0, 1]); //~ ERROR expected type, found
  |                    ^^^^^^^^^^^^^^^^ not a type
  |
help: try using the variant's enum
  |
2 |     let _ = Option:core::option::Option; //~ ERROR expected type, found
  |                    ^^^^^^^^^^^^^^^^^^^^
2 |     let _ = Option:futures_core::core_reexport::option::Option; //~ ERROR expected type, found
  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |     let _ = Option:futures_util::core_reexport::option::Option; //~ ERROR expected type, found
  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |     let _ = Option:lzw::Bits; //~ ERROR expected type, found
  |                    ^^^^^^^^^
    and 5 other candidates
help: maybe you meant to write a path separator here
  |
2 |     let _ = Option::Some(vec![0, 1]); //~ ERROR expected type, found
  |                   ^^

error[E0423]: expected value, found enum `Foo`
 --> src/main.rs:5:13
  |
5 |     let _ = Foo:A; //~ ERROR expected `::`, found `:`
  |             ^^^
  |
help: try using one of the enum's variants
  |
5 |     let _ = Foo::A:A; //~ ERROR expected `::`, found `:`
  |             ^^^^^^
5 |     let _ = Foo::B:A; //~ ERROR expected `::`, found `:`
  |             ^^^^^^
5 |     let _ = Foo::C:A; //~ ERROR expected `::`, found `:`
  |             ^^^^^^

error[E0412]: cannot find type `A` in this scope
 --> src/main.rs:5:17
  |
5 |     let _ = Foo:A; //~ ERROR expected `::`, found `:`
  |                 ^ not found in this scope
  |
help: there is an enum variant `crate::Foo::A`; try using the variant's enum
  |
5 |     let _ = Foo:crate::Foo; //~ ERROR expected `::`, found `:`
  |                 ^^^^^^^^^^
help: maybe you meant to write a path separator here
  |
5 |     let _ = Foo::A; //~ ERROR expected `::`, found `:`
  |                ^^
help: you might be missing a type parameter
  |
4 | fn qux<A>() {
  |       ^^^
estebank

comment created time in 19 days

issue commentrust-lang/rust

Compiler doesn't terminate with --release

@spastorino wanted to flag it for prioritizing and assignment.

io12

comment created time in 19 days

push eventestebank/rust

Esteban Küber

commit sha fe758bbbc160fc34b672525da9cae890ea94bf25

Address some extra cases of `::` typo Deduplicate errors for the following cases: ```rust Foo:A; Foo:B(2); Foo:C { x: 1 }; ``` This commit re-adds `current_expr` (again).

view details

push time in 20 days

pull request commentrust-lang/rust

Deduplicate `::` -> `:` typo errors

(@petrochenkov I can remove the last commit and not handle those cases in this PR)

estebank

comment created time in 20 days

push eventestebank/rust

Esteban Küber

commit sha 65993ee1b22830775eec70023c942c675987d072

run-rustfix

view details

Esteban Küber

commit sha d716e3327fbeff7fa1c59bc25ada1456244ad825

Address some extra cases of `::` typo Deduplicate errors for the following cases: ```rust Foo:A; Foo:B(2); Foo:C { x: 1 }; ``` This commit re-adds `current_expr` (again).

view details

push time in 20 days

pull request commentrust-lang/rust

Permit evaluation of assoc items on `Self` by avoiding cycle error

r? @nikomatsakis ?

estebank

comment created time in 20 days

push eventestebank/rust

Esteban Küber

commit sha ba3cf12981f1e9824c3ea9851542404ff739606d

remove now unnecessary match arm

view details

push time in 20 days

pull request commentrust-lang/rust

Deduplicate `::` -> `:` typo errors

I made some indentation changes in a block, so you might prefer to ignore whitespace in the diff.

estebank

comment created time in 20 days

push eventestebank/rust

Esteban Küber

commit sha ab72aff5272197855e255fe535b3f9226e70914b

remove now unnecessary match arm

view details

push time in 20 days

more