profile
viewpoint
David Wood davidtwco @codeplaysoftware Edinburgh, Scotland https://davidtw.co

davidtwco/ansi-c-exercises 9

@davidtwco does exercises from the C Programming Language, Second Edition by Brian Kernighan and Dennis Ritchie.

davidtwco/dotfiles 8

@davidtwco does dotfiles. Configurations for vim, tmux, zsh, bash, git, gpg and more.

davidtwco/personal-website 2

@davidtwco's personal website containing projects and writings, built using Metalsmith and Gulp, hosted on Netlify.

autokrator-uog/project-and-dissertation 1

Central hub for project documentation and specifications, including final dissertation produced as coursework.

autokrator-uog/user-interface 1

React-based frontend for the financial platform, works with the BfaF to provide a user-friendly live interface to accounts, balances and transactions.

autokrator-uog/accounts-service 0

DEPRECATED: Java-based microservice for managing financial accounts, balances and acception/rejection of transactions.

autokrator-uog/actix-web 0

Actix web framework - fork with minor changes for use with Autokrator project.

autokrator-uog/backend 0

UI Backend (or BfaF/Backend-for-a-frontend) acts as a gateway between the user interface and the microservices, providing a unified API for interacting with the core services.

autokrator-uog/core 0

Autokrator application for Team Project 3 course at the University of Glasgow.

autokrator-uog/demo 0

Full financial platform orchestration and management for use in presenting demos.

Pull request review commentrust-lang/rust

polymorphize: constrain unevaluated const handling

+// build-pass+// compile-flags: -Zpolymorphize=on -Zmir-opt-level=3++fn caller<T, U>() -> &'static usize {+    callee::<U>()+}++fn callee<T>() -> &'static usize {+    &std::mem::size_of::<T>()+}++fn main() {+    assert_eq!(caller::<(), ()>(), &7);

Fixed!

davidtwco

comment created time in 19 hours

push eventdavidtwco/rust

David Wood

commit sha 20f4e168249ca0828b7297942d47040c59376fbe

polymorphize: constrain unevaluated const handling This commit constrains the support added for handling unevaluated consts in polymorphization (introduced in #75260) by: - Skipping associated constants as this causes cycle errors. - Skipping promoted constants when they contain `Self` as this ensures `T` is used in constants of the form `<Self as Foo<T>>`. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 19 hours

Pull request review commentrust-lang/rust

polymorphize: constrain unevaluated const handling

 impl<'a, 'tcx> TypeVisitor<'tcx> for UsedGenericParametersVisitor<'a, 'tcx> {                 self.unused_parameters.clear(param.index);                 false             }-            ty::ConstKind::Unevaluated(_, _, Some(p)) => {+            ty::ConstKind::Unevaluated(def, _, Some(p))+                // Avoid considering `T` unused when constants are of the form:+                //   `<Self as Foo<T>>::foo::promoted[p]`+                if !self.tcx.generics_of(def.did).has_self =>+            {                 // If there is a promoted, don't look at the substs - since it will always contain                 // the generic parameters, instead, traverse the promoted MIR.-                let promoted = self.tcx.promoted_mir(self.def_id);+                let promoted = self.tcx.promoted_mir(def.did);                 self.visit_body(&promoted[p]);

Fixed!

davidtwco

comment created time in 19 hours

push eventdavidtwco/rust

David Wood

commit sha c4dde18cf952bac0a2cac305d0675a5658aea3d3

polymorphize: constrain unevaluated const handling This commit constrains the support added for handling unevaluated consts in polymorphization (introduced in #75260) by: - Skipping associated constants as this causes cycle errors. - Skipping promoted constants when they contain `Self` as this ensures `T` is used in constants of the form `<Self as Foo<T>>`. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 19 hours

Pull request review commentrust-lang/rust

polymorphize: constrain unevaluated const handling

 impl<'a, 'tcx> TypeVisitor<'tcx> for UsedGenericParametersVisitor<'a, 'tcx> {                 self.unused_parameters.clear(param.index);                 false             }-            ty::ConstKind::Unevaluated(_, _, Some(p)) => {+            ty::ConstKind::Unevaluated(def, _, Some(p))+                // Avoid considering `T` unused when constants are of the form:+                //   `<Self as Foo<T>>::foo::promoted[p]`+                if !self.tcx.generics_of(def.did).has_self =>+            {                 // If there is a promoted, don't look at the substs - since it will always contain                 // the generic parameters, instead, traverse the promoted MIR.-                let promoted = self.tcx.promoted_mir(self.def_id);+                let promoted = self.tcx.promoted_mir(def.did);                 self.visit_body(&promoted[p]);

What happens here if def.did != self.def_id. Aren't we then treating the ty::Param of the promoted mir as params of self.def_id?

As far as I'm aware, def.did should be the same as self.def_id (unless we're in the MIR inliner, apparently - which shouldn't be a problem for us). The assumption here is that the promoted MIR has the same generic params as the parent fn's MIR - which is the same assumption that the original PR adding this support had.

davidtwco

comment created time in a day

push eventdavidtwco/veritas

David Wood

commit sha 8b04dda5f3ac6478a29e588c1624694c9ad31bd5

Set `system.configurationRevision`

view details

push time in a day

issue commentrust-lang/rust

Apply polymorphization to `Instance` substitutions

#75346 fixes one of the regressions that #75255 introduced (a out-of-bounds substitution when compiling rustc_metadata in stage2) but stage2 compilation later fails with a linker error compiling rustc_driver and it fixes neither of the UI test failures.

davidtwco

comment created time in a day

PR opened rust-lang/rust

shim: monomorphic `FnPtrShim`s during construction

Fixes #69925.

This PR adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by substs_for_mir_body).

r? @eddyb

+58 -59

0 comment

3 changed files

pr created time in 2 days

create barnchdavidtwco/rust

branch : issue-69925-polymorphic-instancedef-fnptrshim

created branch time in 2 days

push eventdavidtwco/rust

Alexis Bourget

commit sha 6d77e40afe0b0337fa00832d50cdf6b3cd3dfbb9

Move to intra-doc links in library/std/src/path.rs

view details

bors

commit sha 8bc801b05019cd3e0ef19e6c4c028d55baa645d2

Auto merge of #75293 - poliorcetics:intra-doc-links-std-path, r=jyn514 Move to intra-doc links in library/std/src/path.rs Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc Known issue: The following links are broken (they are inside trait impls, undocumented in this file, inheriting from the original doc): - [`Hasher`] - [`Self`] (referencing `../primitive.slice.html`) - [`Ordering`]

view details

push time in 2 days

pull request commentrust-lang/rust

Detect likely `for foo of bar` JS syntax

@bors r+

estebank

comment created time in 2 days

pull request commentrust-lang/rust

polymorphisation: re-enable

#75333 and #75337 will fix the regression above. #75260 and #75255 were fixing (or spun out of fixing) issues with polymorphization and the symbol mangling scheme (e.g. #75326) and so I forgot to run tests with only polymorphization enabled - which let these regressions slip past.

davidtwco

comment created time in 2 days

PR opened rust-lang/rust

instance: only polymorphize upvar substs

This PR restricts the substitution polymorphization added in #75255 to only apply to the tupled upvar substitution, rather than all substitutions, fixing a bunch of regressions when polymorphization is enabled.

Due to an oversight on my part, when landing #75260 and #75255, some tests started failing when polymorphization was enabled that I didn't notice until after landing - this PR fixes the regressions from #75255. #75336 has been filed to make sure that we don't forget to try make this change again in future, as it does enable some optimisations.

r? @lcnr

+33 -88

0 comment

5 changed files

pr created time in 2 days

issue openedrust-lang/rust

Apply polymorphization to `Instance` substitutions

When #75255 landed, all Instance substitutions were polymorphized which enabled optimisation of the following test case:

// compile-flags:-Zpolymorphize=on -Zprint-mono-items=lazy -Copt-level=1
// ignore-tidy-linelength

#![crate_type = "rlib"]

// Test that only one copy of `Iter::map` and `iter::repeat` are generated.

fn unused<T>() -> u64 {
    42
}

fn foo<T>() {
    let x = [1, 2, 3, std::mem::size_of::<T>()];
    x.iter().map(|_| ());
}

//~ MONO_ITEM fn core::iter[0]::adapters[0]::{{impl}}[29]::new[0]<core::slice[0]::Iter[0]<usize>, pr_75255::foo[0]::{{closure}}[0]<T>> @@ pr_75255-cgu.0[External]
//~ MONO_ITEM fn core::iter[0]::traits[0]::iterator[0]::Iterator[0]::map[0]<core::slice[0]::Iter[0]<usize>, (), pr_75255::foo[0]::{{closure}}[0]<T>> @@ pr_75255-cgu.1[Internal]

fn bar<T>() {
    std::iter::repeat(unused::<T>);
}

//~ MONO_ITEM fn core::iter[0]::sources[0]::repeat[0]<fn() -> u64> @@ pr_75255-cgu.1[Internal]

pub fn dispatch() {
    foo::<String>();
    foo::<Vec<String>>();

    bar::<String>();
    bar::<Vec<String>>();
}

// These are all the items that aren't relevant to the test.
//~ MONO_ITEM fn core::mem[0]::size_of[0]<alloc::string[0]::String[0]> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::mem[0]::size_of[0]<alloc::vec[0]::Vec[0]<alloc::string[0]::String[0]>> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::mem[0]::size_of[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::ptr[0]::const_ptr[0]::{{impl}}[0]::add[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::ptr[0]::const_ptr[0]::{{impl}}[0]::is_null[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::ptr[0]::const_ptr[0]::{{impl}}[0]::offset[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::ptr[0]::const_ptr[0]::{{impl}}[0]::wrapping_add[0]<u8> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::ptr[0]::const_ptr[0]::{{impl}}[0]::wrapping_offset[0]<u8> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::ptr[0]::non_null[0]::{{impl}}[3]::new_unchecked[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::ptr[0]::null[0]<u8> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::slice[0]::{{impl}}[0]::as_ptr[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::slice[0]::{{impl}}[0]::iter[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn core::slice[0]::{{impl}}[0]::len[0]<usize> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn pr_75255::dispatch[0] @@ pr_75255-cgu.1[External]
//~ MONO_ITEM fn pr_75255::foo[0]<alloc::string[0]::String[0]> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn pr_75255::foo[0]<alloc::vec[0]::Vec[0]<alloc::string[0]::String[0]>> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn pr_75255::bar[0]<alloc::string[0]::String[0]> @@ pr_75255-cgu.1[Internal]
//~ MONO_ITEM fn pr_75255::bar[0]<alloc::vec[0]::Vec[0]<alloc::string[0]::String[0]>> @@ pr_75255-cgu.1[Internal]

However, due to an oversight, it wasn't noticed that this made other tests and stage2 bootstrapping fail when polymorphisation was enabled (cursory investigation suggested regressions were related to #69925), so it was restricted in #xxxxx to cases that didn't result in regressions. We should investigate what we can do to re-enable this.

created time in 2 days

create barnchdavidtwco/rust

branch : polymorphization-75255-fixes

created branch time in 2 days

push eventdavidtwco/rust

Stefan Lankes

commit sha a4fb1d0b76a6e4e5e980a6839eb318a879635882

adjust remaining targets - fix commit 7dc3886 - previous commit doesn't adjust all targets

view details

Ivan Tham

commit sha e1ef3fa686040a8c9aba34dd954a7ff7227a23ee

Consistent variable name alloc for raw_vec

view details

Alexis Bourget

commit sha d243fa109fd22d334a717e4f03bf208ce9c3a9f4

Fix the documentation for move about Fn traits implementations

view details

Tim Diekmann

commit sha a784729cde2f558bba91984eadf0f152b8a9d288

Add `as_mut_ptr` to `NonNull<[T]>`

view details

Nazım Can Altınova

commit sha e31116af50f35ff81f83561ba607c610f42bbf4a

Add `into_{keys,values}` methods for HashMap

view details

Nazım Can Altınova

commit sha 13529f22ba574e723bea2514ba153bd0dc53bfbb

Add `into_{keys,values}` methods for BTreeMap

view details

Nazım Can Altınova

commit sha 41dd4ee7ffea3e2bed0422675143426b322fc23b

Add unit tests for new `HashMap::into_{keys,values}` methods

view details

Nazım Can Altınova

commit sha 29d9233cf6cc874a03f8a8040115ade40feedf23

Add unit tests for new `BTreeMap::into_{keys,values}` methods

view details

Nazım Can Altınova

commit sha 25545ed18058ca09d98fad50a5405f2ad6c0ec5b

Only print the fields that are relevant to iterators for Debug of IntoKeys and IntoValues

view details

Nazım Can Altınova

commit sha 16a52171414d94f45e32b4cd7e2698329c330dab

Change the comment of BTreeMap::into_values

view details

Ivan Tham

commit sha 06cf40f8a160698aa894507d9c7c9cd29fdbdc66

Show multi extension example for Path in doctests

view details

Josh Stone

commit sha a2cfc74c5fda25795683e813364bb4b63309ee0d

Simplify array::IntoIter - Initialization can use `transmute_copy` to do the bitwise copy. - `as_slice` can use `get_unchecked` and `MaybeUninit::slice_get_ref`, and `as_mut_slice` can do similar. - `next` and `next_back` can use the corresponding `Range` methods. - `Clone` doesn't need any unsafety, and we can dynamically update the new range to get partial drops if `T::clone` panics.

view details

Marko Mijalkovic

commit sha 27fca58993dc129f920928b9ba16ccc689810663

Add back unwinding support for Sony PSP

view details

strom-und-spiele

commit sha 7e68b7d10a7ce505fd41ebc99bd77276ab093a16

Update E0271.md remove references to non existing code, expand solution suggestions remove unneeded code in solution

view details

Ivan Tham

commit sha a11c27925d607f7e1f9bf5a1306b2f2789e55624

Show relative example for Path ancestors

view details

Ivan Tham

commit sha 6dffd2d18e3bb52ec967abef45f7e524a7f91ad9

Separate example for Path strip_prefix

view details

Ivan Tham

commit sha 9532b83912e4d74deee587a303359d56e7bc5602

Show Path extension example change multi extension

view details

Ivan Tham

commit sha b3ae88f6bba244e8b372ed0fc20b000b145ddff0

Use assert! for Path exists example to check bool

view details

Ivan Tham

commit sha 4b15b809eb12f674842855676171f6998bc9ca42

Remove abmiguity from PathBuf pop example

view details

Bastian Kauschke

commit sha ad6d23777b9ca96b1baf9458bcbe7b2e1527ba40

fix `min_const_generics` version

view details

push time in 2 days

PR opened rust-lang/rust

polymorphize: constrain unevaluated const handling

This PR constrains the support added for handling unevaluated consts in polymorphization (introduced in #75260) by:

  • Skipping associated constants as this causes cycle errors.
  • Skipping promoted constants when they contain Self as this ensures T is used in constants of the form <Self as Foo<T>>.

Due to an oversight on my part, when landing #75260 and #75255, some tests started failing when polymorphization was enabled that I didn't notice until after landing - this PR fixes the regressions from #75260.

r? @lcnr

+10 -4

0 comment

1 changed file

pr created time in 2 days

create barnchdavidtwco/rust

branch : polymorphization-75260-fixes

created branch time in 2 days

issue openedrust-lang/rust

Remove `ParamEnv::reveal_all` from codegen

Instead of using ParamEnv::reveal_all, the ParamEnv should be tracked in the mono item - this is necessary to enable more complex forms of polymorphization in future.

something simple like trying layout_of(ty) on various types in the MIR body and ignoring generics in ty if it succeeds, should work, but the lack of a correct ParamEnv would make it fail later (especially if e.g. it's something like &T which only has a constant layout if T: Sized)

(source: eddyb in Zulip)

created time in 2 days

issue openedrust-lang/rust

Symbol ambiguity with polymorphization and new mangling scheme

rustc will not currently bootstrap with -Zsymbol-mangling-version=v0 and -Zpolymorphization=on due to the following issue:

Consider the following example:

// build-pass
// compile-flags: -Zpolymorphize=on -Zsymbol-mangling-version=v0

pub(crate) struct Foo<'a, I, E>(I, &'a E);

impl<'a, I, T: 'a, E> Iterator for Foo<'a, I, E>
where
    I: Iterator<Item = &'a (T, E)>,
{
    type Item = T;

    fn next(&mut self) -> Option<Self::Item> {
        self.find(|_| true)
    }
}

fn main() {
    let mut a = Foo([(1u32, 1u16)].iter(), &1u16);
    let mut b = Foo([(1u16, 1u32)].iter(), &1u32);
    let _ = a.next();
    let _ = b.next();
}

..which produces the following error:

error: symbol `_RNCNvXCs4fqI2P2rA04_19impl_param_manglingINtB4_3FooppENtNtNtNtCsfnEnqCNU58Z_4core4iter6traits8iterator8Iterator4next0B4_` is already defined
  --> src/test/ui/polymorphization/impl-param-mangling.rs:13:19
   |
13 |         self.find(|_| true)
   |                   ^^^^^^^^

error: aborting due to previous error

(unmangled: <impl_param_mangling::Foo<_, _> as core::iter::traits::iterator::Iterator>::next::{closure#0})

Polymorphisation correctly determines that I and E are unused and that T is used in the closure (T is used by the argument). Therefore, multiple copies of this closure can be generated by polymorphization for each instantiation of T - however, this is not encoded in the mangling for the closure, which triggers assert_symbols_are_distinct.

created time in 2 days

issue openedrust-lang/rust

`TypeId` and Polymorphization

When polymorphization is enabled (-Zpolymorphization=on), then this can currently be observed by TypeId. For example, the following code when built with a polymorphization-enabled compiler will fail the asserts (and succeeds normally; playground):

fn nop<T>() {}

fn test_the_waters<A: 'static, B: 'static>(a: A, _: B) {
    let any: Box<dyn std::any::Any> = Box::new(a);
    assert!(any.downcast_ref::<A>().is_some());
    assert!(any.downcast_ref::<B>().is_none());
    assert!(any.downcast_ref::<fn()>().is_none());
}

fn main() {
    test_the_waters(nop::<u32>, nop::<u64>);
}

This issue was discovered while investigating an earlier regression. After #74538 landed, the example shown below, where a polymorphized closure is indirectly passed to TypeId, would result in an ICE (discussion from that investigation):

use std::any::TypeId;

pub fn foo<T: 'static>(_: T) -> TypeId {
    TypeId::of::<T>()
}

fn outer<T: 'static>() {
    foo(|| ());
}

fn main() {
    outer::<u8>();
}

In #74717, the check introduced in #74538 was modified so that this case (and another unrelated case) would no longer ICE for polymorphized functions (discussion regarding that PR). There have been more recent discussion regarding this in a dedicated Zulip topic.

Unresolved questions:

  • [ ] What is the appropriate behaviour here w/r/t polymorphization?
    • Current consensus appears to be that functions involving reflection cannot be polymorphized.
  • [ ] How do we fix this?
    • Without triggering cycle errors, detecting when polymorphization is not appropriate due to later use of TypeId seems very challenging.

created time in 2 days

startedoxidecomputer/expectorate

started time in 2 days

pull request commentrust-lang/rust

polymorphisation: re-enable

Looks like I've got something to fix on Monday. 😢

davidtwco

comment created time in 3 days

pull request commentrust-lang/rust

polymorphisation: re-enable

@bors try @rust-timer queue

davidtwco

comment created time in 3 days

push eventdavidtwco/rust

Andy Russell

commit sha af88ce5eb34b0ecdfd2f8dfcc837c353688d6c75

allow aux builds in rustdoc-ui mode

view details

Andy Russell

commit sha 608807934d41168cb30c6eee6442fe29251e40f0

use outermost invocation span for doctest names Fixes #70090.

view details

Lzu Tao

commit sha a5d0c2c17482e56cae5112083207e8c0ce19cb96

Remove redundant len binding

view details

Lzu Tao

commit sha 34c343ac27c519350577bd1bfdc4d1a3b90e6db6

Make use of macro to avoid repetition

view details

Lzu Tao

commit sha f55e4d036c10f5b887b4ed8c12b7b31f3bb75d23

Get pointer from address of c directly

view details

Yuki Okushi

commit sha 788261d2d30c92c7423a68088aaee32ce44f9520

Add regression test for issue-59311

view details

Oliver Scherer

commit sha c3454c000706176b61ef089107203766735348f7

Check whether locals are too large instead of whether accesses into them are too large

view details

Oliver Scherer

commit sha b26a7d5cd9d9c9ec84eba90b806a453135d20b99

Stop propagating to locals that were marks as unpropagatable. We used to erase these values immediately after propagation, but some things slipped through and it caused us to still initialize huge locals.

view details

Oliver Scherer

commit sha 9e21004c74b8749686c0e5b9195e6822be6280d0

Update ui tests

view details

Oliver Scherer

commit sha 8d5f2bdcd17f3139965b9ef6da8cb13183324485

Add test ensuring that we don't propagate large arrays

view details

Oliver Scherer

commit sha dc0408ec43fa6b63b5cbffbbc07823577c97ea24

Update clippy ui test. The reason we do not trigger these lints anymore is that clippy sets the mir-opt-level to 0, and the recent changes subtly changed how the const propagator works.

view details

Oliver Scherer

commit sha f7a1e64fdb209951e6e77369364feb530a60b04c

Update tests after rebase

view details

Oliver Scherer

commit sha 1864a973b3a0a5a6c5a7c71d7d7cd052732e5c02

Improve the diagnostics around misspelled mir dump filenames

view details

Ximin Luo

commit sha 7f54cf26511b2716d35e2f2198bbff9da5a33123

compiletest: ignore-endian-big, fixes #74829, fixes #74885

view details

Eduard-Mihai Burtescu

commit sha 6bf3a4bcd836e4b29108bfb6d8d7b00d405fd03e

rustc_metadata: track the simplified Self type for every trait impl.

view details

Joshua Nelson

commit sha 8e0e925e2bd45806f88195a94e59246e2e5b6d5e

Disallow linking to items with a mismatched disambiguator

view details

Joshua Nelson

commit sha 519c85439a39d85d0c4b08ff8622cad5bd707ada

Don't mark associated items as traits This caused the following false positive: ``` warning: unresolved link to `Default::default` --> /home/joshua/rustc2/default.rs:1:14 | 1 | /// Link to [Default::default()] | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(broken_intra_doc_links)]` on by default note: this item resolved to a trait, which did not match the disambiguator 'fn' --> /home/joshua/rustc2/default.rs:1:14 | 1 | /// Link to [Default::default()] | ^^^^^^^^^^^^^^^^^^ ```

view details

Joshua Nelson

commit sha 743f9327428801932bd70688b5c83f38bf61615a

Keep the previous behavior of `register_res` Now that we're returning the `Res` of the associated item, not the trait itself, it got confused.

view details

oliver-giersch

commit sha 6c81556a36ac5507fe1f9cd8ee699e6fa2b11077

adds [*mut|*const] ptr::set_ptr_value

view details

Joshua Nelson

commit sha 99354f552df332c669d6e621e68dda403ea135fd

item -> link

view details

push time in 3 days

push eventdavidtwco/rust

Lzu Tao

commit sha a5d0c2c17482e56cae5112083207e8c0ce19cb96

Remove redundant len binding

view details

Lzu Tao

commit sha 34c343ac27c519350577bd1bfdc4d1a3b90e6db6

Make use of macro to avoid repetition

view details

Lzu Tao

commit sha f55e4d036c10f5b887b4ed8c12b7b31f3bb75d23

Get pointer from address of c directly

view details

Oliver Scherer

commit sha c3454c000706176b61ef089107203766735348f7

Check whether locals are too large instead of whether accesses into them are too large

view details

Oliver Scherer

commit sha b26a7d5cd9d9c9ec84eba90b806a453135d20b99

Stop propagating to locals that were marks as unpropagatable. We used to erase these values immediately after propagation, but some things slipped through and it caused us to still initialize huge locals.

view details

Oliver Scherer

commit sha 9e21004c74b8749686c0e5b9195e6822be6280d0

Update ui tests

view details

Oliver Scherer

commit sha 8d5f2bdcd17f3139965b9ef6da8cb13183324485

Add test ensuring that we don't propagate large arrays

view details

Oliver Scherer

commit sha dc0408ec43fa6b63b5cbffbbc07823577c97ea24

Update clippy ui test. The reason we do not trigger these lints anymore is that clippy sets the mir-opt-level to 0, and the recent changes subtly changed how the const propagator works.

view details

Oliver Scherer

commit sha f7a1e64fdb209951e6e77369364feb530a60b04c

Update tests after rebase

view details

Oliver Scherer

commit sha 1864a973b3a0a5a6c5a7c71d7d7cd052732e5c02

Improve the diagnostics around misspelled mir dump filenames

view details

Bastian Kauschke

commit sha 375bccb8b3fa2a517e6e19e24da25cad0413987d

add min_const_generics feature gate

view details

Bastian Kauschke

commit sha 289e5fca7ecdb03db97be9d89ae908f253a3f263

forbid generic params in complex consts

view details

Bastian Kauschke

commit sha 188bbf840dd858edb929459bd3536219fa062077

forbid complex types for generic parameters

view details

Bastian Kauschke

commit sha a5a5ca0da8cd536c0d6b2e7eb7da6304047dc750

add tracking issue

view details

Bastian Kauschke

commit sha 0d54f571c10dbc7e6d8632698c5f08f77b4a7578

impl review

view details

Aaron Hill

commit sha bbcacddef691464e5abe373f95849670298c63a7

Don't call a function in function-arguments-naked.rs Fixes #75096 It's U.B. to use anything other than inline assmebling in a naked function. Fortunately, the `#break` directive works fine without anything in the function body.

view details

Vadim Petrochenkov

commit sha 46f48d31fed06295a83f7695b74159ff58a0943c

rustc_ast: Stop using "string typing" for doc comment tokens Explicitly store their kind and style retrieved during lexing in the token

view details

Vadim Petrochenkov

commit sha 000c070b70eba07a903db82fb8505433842fe1f1

rustc_ast/comments: Modernize some enum reexports

view details

Vadim Petrochenkov

commit sha 712de2b5211ec9aad434358d459e843ca9a4622d

rustc_expand: Don not beautify doc comments before passing them to macros Beautify all doc strings in rustdoc instead, including those in `#[doc]` attributes

view details

Vadim Petrochenkov

commit sha 6b25c50ed467396c367d41eca6b8248136140974

Fix clippy

view details

push time in 3 days

pull request commentrust-lang/rust

polymorphisation: re-enable

Should we rebase this and requeue the crater run, considering the recent changes?

I'm tempted to, we'd only go back one spot in the queue.

davidtwco

comment created time in 3 days

delete branch davidtwco/rust

delete branch : polymorphization-promoted-substs

delete time in 3 days

delete branch davidtwco/rust

delete branch : polymorphisation-symbol-mangling-v0-upvar-closures

delete time in 3 days

pull request commentrust-lang/rust

instance: polymorphize upvar closures/generators

@bors r=lcnr

davidtwco

comment created time in 4 days

push eventdavidtwco/rust

David Wood

commit sha d9decede3593e220d1a4f4a63b4c651b70073861

instance: polymorphize upvar closures/generators This commit modifies how instances are polymorphized so that closures and generators have any closures or generators captured within their upvars also polymorphized - this avoids symbol clashes with the new symbol mangling scheme. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha 0d9924a87b862529591c3039959fef5bc7c95359

instance: always polymorphize substs By always polymorphizing substitutions, functions which take closures as arguments (e.g. `impl Fn()`) can have fewer mono items when some of the argument closures can be polymorphized. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha 5827b5a4bd0bb35251da12fc972aa1d5a210116f

ty: add `MAY_POLYMORPHIZE` flag This commit adds a `MAY_POLYMORPHIZE` which checks for closures and generators so that polymorphization of substs does not need to traverse every substs. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha 4ccaf6f38ce5b617635ec5dc738275c681090eff

instance: avoid unnecessary `mk_` calls This commit avoids unnecessary calls to `mk_closure` and `mk_generator` by checking if the polymorphized substs match the original substs. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha ac50d61785ae5112b9b4e30a58cfcffe096b31ec

instance: polymorphize `FnDef` substs This commit extends previous polymorphization of substs to polymorphize `FnDef`. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

+// build-pass+// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0++fn foo(f: impl Fn()) {+    // Mutate a upvar from `x` so that it implements `FnMut`.

Fixed!

davidtwco

comment created time in 4 days

pull request commentrust-lang/rust

instance: polymorphize upvar closures/generators

I've addressed those comments, including adding the type flag.

r? @lcnr

davidtwco

comment created time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

 impl<'tcx> Instance<'tcx> {     } } +fn polymorphize<'tcx>(+    tcx: TyCtxt<'tcx>,+    def_id: DefId,+    substs: SubstsRef<'tcx>,+) -> SubstsRef<'tcx> {+    debug!("polymorphize({:?}, {:?})", def_id, substs);+    let unused = tcx.unused_generic_params(def_id);+    debug!("polymorphize: unused={:?}", unused);++    struct PolymorphizationFolder<'tcx> {+        tcx: TyCtxt<'tcx>,+    };++    impl ty::TypeFolder<'tcx> for PolymorphizationFolder<'tcx> {+        fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {+            self.tcx+        }++        fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {+            debug!("fold_ty: ty={:?}", ty);+            match ty.kind {+                ty::Closure(def_id, substs) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_closure(def_id, polymorphized_substs)+                }+                ty::Generator(def_id, substs, movability) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_generator(def_id, polymorphized_substs, movability)+                }+                _ => ty.super_fold_with(self),

Fixed!

davidtwco

comment created time in 4 days

push eventdavidtwco/rust

David Wood

commit sha c59cb0022931d64403834d20fc759e78d7c7c2c1

ty: add `MAY_POLYMORPHIZE` flag This commit adds a `MAY_POLYMORPHIZE` which checks for closures and generators so that polymorphization of substs does not need to traverse every substs. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha c8938c3e162bca1ab1289cfbe07bf9d2366dd74b

instance: avoid unnecessary `mk_` calls This commit avoids unnecessary calls to `mk_closure` and `mk_generator` by checking if the polymorphized substs match the original substs. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha e9cab0c4a4e4559ea45793a10447348e39642b7b

instance: polymorphize `FnDef` substs This commit extends previous polymorphization of substs to polymorphize `FnDef`. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

 impl<'tcx> Instance<'tcx> {     } } +fn polymorphize<'tcx>(+    tcx: TyCtxt<'tcx>,+    def_id: DefId,+    substs: SubstsRef<'tcx>,+) -> SubstsRef<'tcx> {+    debug!("polymorphize({:?}, {:?})", def_id, substs);+    let unused = tcx.unused_generic_params(def_id);+    debug!("polymorphize: unused={:?}", unused);++    struct PolymorphizationFolder<'tcx> {+        tcx: TyCtxt<'tcx>,+    };++    impl ty::TypeFolder<'tcx> for PolymorphizationFolder<'tcx> {+        fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {+            self.tcx+        }++        fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {+            debug!("fold_ty: ty={:?}", ty);+            match ty.kind {+                ty::Closure(def_id, substs) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_closure(def_id, polymorphized_substs)

Fixed!

davidtwco

comment created time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

 impl<'tcx> Instance<'tcx> {     } } +fn polymorphize<'tcx>(+    tcx: TyCtxt<'tcx>,+    def_id: DefId,+    substs: SubstsRef<'tcx>,+) -> SubstsRef<'tcx> {+    debug!("polymorphize({:?}, {:?})", def_id, substs);+    let unused = tcx.unused_generic_params(def_id);+    debug!("polymorphize: unused={:?}", unused);++    struct PolymorphizationFolder<'tcx> {+        tcx: TyCtxt<'tcx>,+    };++    impl ty::TypeFolder<'tcx> for PolymorphizationFolder<'tcx> {+        fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {+            self.tcx+        }++        fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {+            debug!("fold_ty: ty={:?}", ty);+            match ty.kind {+                ty::Closure(def_id, substs) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_closure(def_id, polymorphized_substs)+                }+                ty::Generator(def_id, substs, movability) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_generator(def_id, polymorphized_substs, movability)+                }+                _ => ty.super_fold_with(self),

At least for the original mangling issue, I wasn't sure that it could happen with a FnDef.

davidtwco

comment created time in 4 days

pull request commentrust-lang/rust

polymorphize: unevaluated constants

@bors r=lcnr

davidtwco

comment created time in 4 days

Pull request review commentrust-lang/rust

polymorphize: visit promoted MIR

 impl<'a, 'tcx> TypeVisitor<'tcx> for UsedGenericParametersVisitor<'a, 'tcx> {                 self.unused_parameters.clear(param.index);                 false             }+            ty::ConstKind::Unevaluated(_, _, Some(p)) => {

Fixed!

davidtwco

comment created time in 4 days

push eventdavidtwco/rust

David Wood

commit sha d97f89b1a6add41b6ac3c0d69cbe82d15483a0d6

polymorphize: non-promoted unevaluated constants This commit makes polymorphization visit non-promoted unevaluated constants rather than visit their substs directly. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

 impl<'tcx> Instance<'tcx> {     } } +fn polymorphize<'tcx>(+    tcx: TyCtxt<'tcx>,+    def_id: DefId,+    substs: SubstsRef<'tcx>,+) -> SubstsRef<'tcx> {+    debug!("polymorphize({:?}, {:?})", def_id, substs);+    let unused = tcx.unused_generic_params(def_id);+    debug!("polymorphize: unused={:?}", unused);++    if unused.is_empty() {+        // Exit early if every parameter was used.+        return substs;+    }++    // If this is a closure or generator then we need to handle the case where another closure+    // from the function is captured as an upvar and hasn't been polymorphized. In this case,+    // the unpolymorphized upvar closure would result in a polymorphized closure producing+    // multiple mono items (and eventually symbol clashes).+    let upvars_ty = if tcx.is_closure(def_id) {+        Some(substs.as_closure().tupled_upvars_ty())+    } else if tcx.type_of(def_id).is_generator() {+        Some(substs.as_generator().tupled_upvars_ty())+    } else {+        None+    };+    let has_upvars = upvars_ty.map(|ty| ty.tuple_fields().count() > 0).unwrap_or(false);+    debug!("polymorphize: upvars_ty={:?} has_upvars={:?}", upvars_ty, has_upvars);++    struct PolymorphizationFolder<'tcx> {+        tcx: TyCtxt<'tcx>,+    };++    impl ty::TypeFolder<'tcx> for PolymorphizationFolder<'tcx> {+        fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {+            self.tcx+        }++        fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {+            debug!("fold_ty: ty={:?}", ty);+            match ty.kind {+                ty::Closure(def_id, substs) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_closure(def_id, polymorphized_substs)+                }+                ty::Generator(def_id, substs, movability) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_generator(def_id, polymorphized_substs, movability)+                }+                _ => ty.super_fold_with(self),+            }+        }+    }++    InternalSubsts::for_item(tcx, def_id, |param, _| {+        let is_unused = unused.contains(param.index).unwrap_or(false);+        debug!("polymorphize: param={:?} is_unused={:?}", param, is_unused);+        match param.kind {+            // Upvar case: If parameter is a type parameter..+            ty::GenericParamDefKind::Type { .. } if+                // ..and has upvars..+                has_upvars &&+                // ..and this param has the same type as the tupled upvars..+                upvars_ty == Some(substs[param.index as usize].expect_ty()) => {+                    // ..then double-check that polymorphization marked it used..+                    debug_assert!(!is_unused);+                    // ..and polymorphize any closures/generators captured as upvars.+                    let upvars_ty = upvars_ty.unwrap();+                    let polymorphized_upvars_ty = upvars_ty.fold_with(+                        &mut PolymorphizationFolder { tcx });+                    debug!("polymorphize: polymorphized_upvars_ty={:?}", polymorphized_upvars_ty);+                    ty::GenericArg::from(polymorphized_upvars_ty)+                },++            // Simple case: If parameter is a const or type parameter..+            ty::GenericParamDefKind::Const | ty::GenericParamDefKind::Type { .. } if+                // ..and is within range and unused..+                unused.contains(param.index).unwrap_or(false) =>+                    // ..then use the identity for this parameter.+                    tcx.mk_param_from_def(param),++            // Otherwise, use the parameter as before.+            _ => substs[param.index as usize],

Fixed!

davidtwco

comment created time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

+// build-pass+// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0++fn foo(f: impl Fn()) {+    let x = |_: ()| ();++    // Don't use `f` in `y`, but refer to `x` so that the closure substs contain a reference to+    // `x` that will differ for each instantiation despite polymorphisation of the varying+    // argument.+    let y = || x(());

I've added tests for the cases we've discussed here.

davidtwco

comment created time in 4 days

push eventdavidtwco/rust

David Wood

commit sha f91bde7747a02617a0eb9764dfc1e0855369596b

instance: polymorphize upvar closures/generators This commit modifies how instances are polymorphized so that closures and generators have any closures or generators captured within their upvars also polymorphized - this avoids symbol clashes with the new symbol mangling scheme. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha c6f361bac4364c0e14a271ceb8125c780c1aa4d4

instance: always polymorphize substs By always polymorphizing substitutions, functions which take closures as arguments (e.g. `impl Fn()`) can have fewer mono items when some of the argument closures can be polymorphized. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

+// build-pass+// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0++fn foo(f: impl Fn()) {+    let x = |_: ()| ();++    // Don't use `f` in `y`, but refer to `x` so that the closure substs contain a reference to+    // `x` that will differ for each instantiation despite polymorphisation of the varying+    // argument.+    let y = || x(());

However, it occurs to me that we might still have a issue if x considers f used. In that case, this patch wouldn’t change the upvar substitutions in y for x and therefore we’d still produce two mono items that aren’t equal but produce the same symbol. Not sure how to deal with that case - don’t consider upvars in hashing and equality?

After discussion with @lcnr and testing locally, can confirm that we don't have an issue here.

Can y consider f unused if it uses x which considers it used?

If we allowed this then I think we could run into issues with the symbol mangling again - because the upvar of x in y would differ depending on the instantiation of f, which would result in two mono items which have the same symbol, triggering assert_symbols_are_distinct with the new mangling scheme.

davidtwco

comment created time in 4 days

PR opened rust-lang/rust

polymorphize: visit promoted MIR

This PR makes polymorphization visited the MIR of unevaluated constants with available promoted MIR instead of visiting the substitutions of that constant - which will mark all of the generic parameters as used.

r? @lcnr

+46 -2

0 comment

6 changed files

pr created time in 4 days

create barnchdavidtwco/rust

branch : polymorphization-promoted-substs

created branch time in 4 days

push eventdavidtwco/rust

Andy Russell

commit sha af88ce5eb34b0ecdfd2f8dfcc837c353688d6c75

allow aux builds in rustdoc-ui mode

view details

Andy Russell

commit sha 608807934d41168cb30c6eee6442fe29251e40f0

use outermost invocation span for doctest names Fixes #70090.

view details

Yuki Okushi

commit sha 788261d2d30c92c7423a68088aaee32ce44f9520

Add regression test for issue-59311

view details

Ximin Luo

commit sha 7f54cf26511b2716d35e2f2198bbff9da5a33123

compiletest: ignore-endian-big, fixes #74829, fixes #74885

view details

Joshua Nelson

commit sha 8e0e925e2bd45806f88195a94e59246e2e5b6d5e

Disallow linking to items with a mismatched disambiguator

view details

Joshua Nelson

commit sha 519c85439a39d85d0c4b08ff8622cad5bd707ada

Don't mark associated items as traits This caused the following false positive: ``` warning: unresolved link to `Default::default` --> /home/joshua/rustc2/default.rs:1:14 | 1 | /// Link to [Default::default()] | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(broken_intra_doc_links)]` on by default note: this item resolved to a trait, which did not match the disambiguator 'fn' --> /home/joshua/rustc2/default.rs:1:14 | 1 | /// Link to [Default::default()] | ^^^^^^^^^^^^^^^^^^ ```

view details

Joshua Nelson

commit sha 743f9327428801932bd70688b5c83f38bf61615a

Keep the previous behavior of `register_res` Now that we're returning the `Res` of the associated item, not the trait itself, it got confused.

view details

oliver-giersch

commit sha 6c81556a36ac5507fe1f9cd8ee699e6fa2b11077

adds [*mut|*const] ptr::set_ptr_value

view details

Joshua Nelson

commit sha 99354f552df332c669d6e621e68dda403ea135fd

item -> link

view details

Tomasz Miąsko

commit sha 427634b5037ba1c00b72b70b561ff20767ea97e2

Avoid `unwrap_or_else` in str indexing This provides a small reduction of generated LLVM IR, and leads to a simpler assembly code.

view details

Lzu Tao

commit sha 30a1455c8da95ca3f4f8fb33edfa556678e3ac58

Use u32::from_ne_bytes to fix a FIXME Co-authored-by: Weiyi Wang <wwylele@gmail.com> Co-authored-by: Adam Reichold <adam.reichold@t-online.de> Co-authored-by: Josh Stone <cuviper@gmail.com> Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com> Co-authored-by: tmiasko <tomasz.miasko@gmail.com>

view details

Joshua Nelson

commit sha 444f5a0556fc5779663e69ff1a3d5a7362ba9618

Give a much better error message if the struct failed to resolve

view details

Joshua Nelson

commit sha fc273a035dfb352fd90246dd2560c807701eeea7

Unresolved link -> incompatible link kind Clearly it has been resolved, because we say on the next line what it resolved to.

view details

Lzu Tao

commit sha 725d37cae0a175edb0c013b3de5b337ce5b5054d

Make doctests of Ipv4Addr::from(u32) easier to read

view details

Lzu Tao

commit sha d9f260e95efcb3ada02d1cd85d304438de8af294

Remove unused FromInner impl for Ipv4Addr

view details

Waffle Lapkin

commit sha 188ef3a200c6d39aa343da4d556d8354424f2314

Fix typo in `librustc_feature/active.rs`

view details

Aaron Hill

commit sha 0d8260ee48d19291ad99f1228a638e75a5453379

Label rustfmt toolstate issues with A-rustfmt This makes it easier to filter toolstate issues by the tool involved.

view details

Aaron Hill

commit sha 48bc3982079685763a5bde07b7e4efb94ce622e0

Handle fieldless tuple structs in diagnostic code Fixes #75062

view details

Guillaume Gomez

commit sha cd4633917d4dd446f9f37efbf750bbd4ed2b46d6

Clean up E0746 explanation

view details

Yuki Okushi

commit sha cc36c3d140b82757c5ffe94c71232d2f32fcf2a4

Add a FIXME comment

view details

push time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

+// build-pass+// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0++fn foo(f: impl Fn()) {+    let x = |_: ()| ();++    // Don't use `f` in `y`, but refer to `x` so that the closure substs contain a reference to+    // `x` that will differ for each instantiation despite polymorphisation of the varying+    // argument.+    let y = || x(());

If y considers f used then it’ll produce two mono items with different symbols (because f varies) - with this PR, in both mono items, the upvar subst for x will be polymorphised. x would still produce a single mono item like now.

However, it occurs to me that we might still have a issue if x considers f used. In that case, this patch wouldn’t change the upvar substitutions in y for x and therefore we’d still produce two mono items that aren’t equal but produce the same symbol. Not sure how to deal with that case - don’t consider upvars in hashing and equality?

davidtwco

comment created time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

 impl<'tcx> Instance<'tcx> {     } } +fn polymorphize<'tcx>(+    tcx: TyCtxt<'tcx>,+    def_id: DefId,+    substs: SubstsRef<'tcx>,+) -> SubstsRef<'tcx> {+    debug!("polymorphize({:?}, {:?})", def_id, substs);+    let unused = tcx.unused_generic_params(def_id);+    debug!("polymorphize: unused={:?}", unused);++    if unused.is_empty() {+        // Exit early if every parameter was used.+        return substs;+    }++    // If this is a closure or generator then we need to handle the case where another closure+    // from the function is captured as an upvar and hasn't been polymorphized. In this case,+    // the unpolymorphized upvar closure would result in a polymorphized closure producing+    // multiple mono items (and eventually symbol clashes).+    let upvars_ty = if tcx.is_closure(def_id) {+        Some(substs.as_closure().tupled_upvars_ty())+    } else if tcx.type_of(def_id).is_generator() {+        Some(substs.as_generator().tupled_upvars_ty())+    } else {+        None+    };+    let has_upvars = upvars_ty.map(|ty| ty.tuple_fields().count() > 0).unwrap_or(false);+    debug!("polymorphize: upvars_ty={:?} has_upvars={:?}", upvars_ty, has_upvars);++    struct PolymorphizationFolder<'tcx> {+        tcx: TyCtxt<'tcx>,+    };++    impl ty::TypeFolder<'tcx> for PolymorphizationFolder<'tcx> {+        fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {+            self.tcx+        }++        fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {+            debug!("fold_ty: ty={:?}", ty);+            match ty.kind {+                ty::Closure(def_id, substs) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_closure(def_id, polymorphized_substs)+                }+                ty::Generator(def_id, substs, movability) => {+                    let polymorphized_substs = polymorphize(self.tcx, def_id, substs);+                    self.tcx.mk_generator(def_id, polymorphized_substs, movability)+                }+                _ => ty.super_fold_with(self),+            }+        }+    }++    InternalSubsts::for_item(tcx, def_id, |param, _| {+        let is_unused = unused.contains(param.index).unwrap_or(false);+        debug!("polymorphize: param={:?} is_unused={:?}", param, is_unused);+        match param.kind {+            // Upvar case: If parameter is a type parameter..+            ty::GenericParamDefKind::Type { .. } if+                // ..and has upvars..+                has_upvars &&+                // ..and this param has the same type as the tupled upvars..+                upvars_ty == Some(substs[param.index as usize].expect_ty()) => {+                    // ..then double-check that polymorphization marked it used..+                    debug_assert!(!is_unused);+                    // ..and polymorphize any closures/generators captured as upvars.+                    let upvars_ty = upvars_ty.unwrap();+                    let polymorphized_upvars_ty = upvars_ty.fold_with(+                        &mut PolymorphizationFolder { tcx });+                    debug!("polymorphize: polymorphized_upvars_ty={:?}", polymorphized_upvars_ty);+                    ty::GenericArg::from(polymorphized_upvars_ty)+                },++            // Simple case: If parameter is a const or type parameter..+            ty::GenericParamDefKind::Const | ty::GenericParamDefKind::Type { .. } if+                // ..and is within range and unused..+                unused.contains(param.index).unwrap_or(false) =>+                    // ..then use the identity for this parameter.+                    tcx.mk_param_from_def(param),++            // Otherwise, use the parameter as before.+            _ => substs[param.index as usize],

Applying this suggestion would also work (instead of adding another arm like the PR currently does). I avoided doing this because I figured it would be more expensive (traversing every substitution rather than just upvars).

That said, I might be missing something, because I’m now sure how it would help with the example in your second comment (test and its closure would be polymorphised now and with your change, no?).

davidtwco

comment created time in 4 days

Pull request review commentrust-lang/rust

instance: polymorphize upvar closures/generators

 impl<'tcx> Instance<'tcx> {     } } +fn polymorphize<'tcx>(+    tcx: TyCtxt<'tcx>,+    def_id: DefId,+    substs: SubstsRef<'tcx>,+) -> SubstsRef<'tcx> {+    debug!("polymorphize({:?}, {:?})", def_id, substs);+    let unused = tcx.unused_generic_params(def_id);+    debug!("polymorphize: unused={:?}", unused);++    if unused.is_empty() {+        // Exit early if every parameter was used.+        return substs;+    }++    // If this is a closure or generator then we need to handle the case where another closure+    // from the function is captured as an upvar and hasn't been polymorphized. In this case,+    // the unpolymorphized upvar closure would result in a polymorphized closure producing+    // multiple mono items (and eventually symbol clashes).+    let upvars_ty = if tcx.is_closure(def_id) {

I don't think that would work; unused_generic_params could inspect the upvar tuple (it doesn't currently) and then invoke itself on any closure/generator upvars but if it went on to change that upvar closure (like this function does) then that wouldn't change anything outside of the query - by changing this here, it changes what goes into the MonoItem.

davidtwco

comment created time in 4 days

PR opened rust-lang/rust

instance: polymorphize upvar closures/generators

This PR modifies how instances are polymorphized so that closures and generators have any closures or generators captured within their upvars also polymorphized.

With the new symbol mangling, a fully polymorphised closure will produce the same symbol regardless of what it was instantiated with. However, when that polymorphised closure captures another closure as an upvar, then the type of that other closure in the upvar substitution wouldn't have been polymorphised. The other closure will still refer to the initial substitutions. Therefore, the polymorphised closure will end up hashing differently but producing the same symbol - triggering assert_symbols_are_distinct in MIR partitioning. The old mangling scheme had a hash at the end that meant this didn't happen (this would still have been an issue, we just didn't have a way to notice).

See this Zulip discussion for further elaboration.

r? @eddyb cc @lcnr

+184 -20

0 comment

4 changed files

pr created time in 4 days

delete branch davidtwco/rust

delete branch : polymorphization-symbol-mangling-v0

delete time in 4 days

push eventdavidtwco/rust

David Wood

commit sha a6535d26a365e068430bb8d85d8f4bc77c24ce2d

instance: polymorphize upvar closures/generators This commit modifies how instances are polymorphized so that closures and generators have any closures or generators captured within their upvars also polymorphized - this avoids symbol clashes with the new symbol mangling scheme. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 4 days

create barnchdavidtwco/rust

branch : polymorphization-symbol-mangling-v0

created branch time in 4 days

push eventdavidtwco/rust

Eduard-Mihai Burtescu

commit sha 6bf3a4bcd836e4b29108bfb6d8d7b00d405fd03e

rustc_metadata: track the simplified Self type for every trait impl.

view details

kadmin

commit sha f3380547138df05d4ac23e4a905756cfbe76fc79

Add regression test As well as matching error outputs

view details

kadmin

commit sha 7dd1b6a22fc7c98cc3e3daeaae3a51bc184fee34

Add regression test

view details

Eric Huss

commit sha f6855eacd1544cea34134dfdb7c7f426e5b0442a

Update cargo

view details

Nicholas Nethercote

commit sha 530140729a458462f5c6e735e771651ce419a0a3

Avoid an unnecessary thread creation at rustdoc startup. rustdoc's `main()` immediately spawns a thread, M, with a large stack (16MiB or 32MiB) on which it runs `main_args()`. `main_args()` does a small amount of options processing and then calls `setup_callbacks_and_run_in_default_thread_pool_with_globals()`, which spawns it own thread, and M is not used further. So, thread M seems unnecessary. However, it does serve a purpose: if the options processing in `main_args()` panics, that panic is caught when M is joined. So M can't simply be removed. However, `main_options()`, which is called by `main_args()`, has a `catch_fatal_errors()` call within it. We can move that call to `main()` and change it to the very similar `catch_with_exit_code()`. With that in place, M can be removed, and panics from options processing will still be caught appropriately. Even better, this makes rustdoc's `main()` match rustc's `main()`, which also uses `catch_with_exit_code()`. (Also note that the use of a 16MiB/32MiB stack was eliminated from rustc in #55617.)

view details

Nicholas Nethercote

commit sha af4e3e08ea3d9739e5af541b737527584cea1d8f

Remove `setup_callbacks_and_run_in_default_thread_pool_with_globals()`. It's a very thin wrapper around `setup_callbacks_and_run_in_thread_pool_with_globals()` and it has a single call site.

view details

Nicholas Nethercote

commit sha 5f8a11279d75dc0078edbd8fa9d1fd1184c3f4ec

Be smarter about error handling in `run()`. `run()` returns `Result<(), String>`. But on failure it always returns an empty string, and then `wrap_return()` treats an empty string specially, by not reporting the error. It turns out we already have the `ErrorReported` type for this sort of behaviour. This commit changes `run()` to use it.

view details

bors

commit sha 1d69e3b1d753951bc7df0f02d6fd4719065d98c3

Auto merge of #75124 - nnethercote:clean-up-rustdoc-main, r=oli-obk Clean up rustdoc's `main()` It can be simplified and made more similar to rustc's `main()`. r? @oli-obk

view details

bors

commit sha 8b84156c6ee2b4e707dc32f5a516e3143ab924d3

Auto merge of #75169 - ehuss:update-cargo, r=ehuss Update cargo 8 commits in 2d5c2381e4e50484bf281fc1bfe19743aa9eb37a..1653f354644834073d6d2541e27fae94588e685e 2020-07-31 21:56:08 +0000 to 2020-08-04 23:14:37 +0000 - Fix close_output test. (rust-lang/cargo#8587) - clippy fixes, use matches! macro in more places (rust-lang/cargo#8575) - Display embedded man pages for built-in commands. (rust-lang/cargo#8456) - Add mdman for generating man pages. (rust-lang/cargo#8577) - Fix typo 'more then' -&gt; 'more than' in error and comments (rust-lang/cargo#8581) - cargo login: make login message less ambiguous (rust-lang/cargo#8579) - Fix broken link in Build Cache chapter. (rust-lang/cargo#8578) - Fix intra-doc tests for renamed lint. (rust-lang/cargo#8576)

view details

bors

commit sha ec9d5241f749978150a35f82a2358f494c5b9080

Auto merge of #75165 - JulianKnodt:i72787, r=lcnr Add regression test for #72787 Add regression test for Issue #72787 Fixes #72787 ~~Still waiting on running tests locally to bless the error output~~ r? @lcnr

view details

Adam Reichold

commit sha 94687525815cb2138779e17a766e24c826819d7c

Query maximum vector count on Linux and macOS Both Linux and MacOS enforce limits on the vector count when performing vectored I/O via the readv and writev system calls and return EINVAL when these limits are exceeded. This changes the standard library to handle those limits as short reads and writes to avoid forcing its users to query these limits using platform specific mechanisms.

view details

Adam Reichold

commit sha 6672f7be032e1fc392cb0e2a785563b82b095117

Memoize the I/O vector count limit Keep the I/O vector count limit in a `SyncOnceCell` to avoid the overhead of repeatedly calling `sysconf` as these limits are guaranteed to not change during the lifetime of a process by POSIX.

view details

Adam Reichold

commit sha 87edccf0f048d566596495650188eea15cdf62d6

Reduce synchronization overhead of I/O vector count memoization

view details

Adam Reichold

commit sha 04a0114e7ecc44049425aaf8f7ba7f66da80e0c4

Rely only on POSIX semantics for I/O vector count All #[cfg(unix)] platforms follow the POSIX standard and define _SC_IOV_MAX so that we rely purely on POSIX semantics to determine the limits on I/O vector count.

view details

Aaron Hill

commit sha f9f89233938579f1b0dfd218c8db0878bda8c3e7

Show backtrace numbers in backtrace whenever more than one is involved Previously, we only displayed 'frame' numbers in a macro backtrace when more than two frames were involved. This commit should help make backtrace more readable, since these kinds of messages can quickly get confusing.

view details

Adam Reichold

commit sha 9073acdc9888acd2ba66601a77b96fbda67ac8c7

Add fallback for cfg(unix) targets that do not define libc::_SC_IOV_MAX.

view details

bors

commit sha db870ea71b6dcc7a91b999420b88f41d3cdd13e1

Auto merge of #75194 - Aaron1011:feature/macro-backtrace-numbers, r=eddyb Show backtrace numbers in backtrace whenever more than one is involved Previously, we only displayed 'frame' numbers in a macro backtrace when more than two frames were involved. This commit should help make backtrace more readable, since these kinds of messages can quickly get confusing.

view details

bors

commit sha 52b179b4b51e3d1bbc5d687f8680c38321678830

Auto merge of #75005 - adamreichold:limit-vector-count, r=Amanieu Limit I/O vector count on Unix Unix systems enforce limits on the vector count when performing vectored I/O via the readv and writev system calls and return EINVAL when these limits are exceeded. This changes the standard library to handle those limits as short reads and writes to avoid forcing its users to query these limits using platform specific mechanisms. Fixes #68042

view details

bors

commit sha 22ee68dc586440f96b76b32fbd6087507c6afdb9

Auto merge of #75166 - JulianKnodt:i64494, r=lcnr Add regression test for #64494 Add regression test to indicate if this compilation ever succeeds. Fixes #64494 r? @lcnr

view details

bors

commit sha 3cfc7fe78eccc754b16981704a098d7bd520e2fd

Auto merge of #75008 - eddyb:rmeta-indexed-trait-impls, r=nikomatsakis rustc_metadata: track the simplified Self type for every trait impl. For the `traits_impls_of` query, we index the impls by `fast_reject::SimplifiedType` (a "shallow type"), which allows some simple cases like `impl Trait<..> for Foo<..>` to be efficiently iterated over, by e.g. `for_each_relevant_impl`. This PR encodes the `fast_reject::SimplifiedType` cross-crate to avoid needing to deserialize the `Self` type of every `impl` in order to simplify it - the simplification itself should be cheap, but the deserialization is less so. We could go further from here and make loading the list of impls lazy, for a given simplified `Self` type, but that would have more complicated implications for performance, and this PR doesn't do anything in that regard. r? @nikomatsakis cc @Mark-Simulacrum

view details

push time in 5 days

pull request commentrust-lang/rust

polymorphization: various improvements

I don't understand how can this be a perf improvement when the polymorphization is still disabled. Does the pass run even when disabled but results are not used?

Polymorphisation still gets invoked but immediately returns with a result indicating that all generic parameters are used.

Other parts of the PR which introduced polymorphisation are still present. Among these changes, the results of polymorphisation are being written to the cross-crate metadata so when polymorphisation is invoked while disabled, it would still preferentially load that from the cross-crate metadata - that's slower when the query is really fast (e.g. when polymorphisation is disabled).

See this comment for this phrased differently.

davidtwco

comment created time in 6 days

issue openedzulip/zulip

Distinguish between full and new members in organization settings

In the organization settings, under "Users", it would be helpful if users were listed as "New Member" or "Full Member", rather than just "Member" so that it is easy to tell who has new member limitations applied. I had to work this out manually when debugging an issue (which ended up being 4f930688cf2977be8047a11ecd07d1cdc8120bd3).

created time in 6 days

push eventdavidtwco/zulip

Anders Kaseorg

commit sha aa16208fd83f4d2d63a3f089da9614c4fffcaf43

dependencies: Upgrade JavaScript dependencies. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha b3da022bdfd975195b99444518b1d3002a03fd0c

install-node: Upgrade Node.js to 12.18.2. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Sahil Silare

commit sha 619f11a0ce297b6b6a2a6648b52cae2307baa54d

edit: Removed "William Wendling" from the django.po file. @Guetrazik asked for his name to be removed from the django.po file. Fixes #15833.

view details

Ryan Rehman

commit sha 1696c9ac20d5afe659c79cd4aacbe513f9907399

ui: Fix loading spinner glitch. On calling `loading.make_indicator` for the second time or more no spinner is being displayed. This bug can be viewed on visiting a `near: 1` narrow and the spinner for the newer messages is displayed only once (i.e. the first time it is rendered), while the logo is displayed every time. This happens because `loading.destroy_indicator` sets the css of that container to display: "none". This can be removed as we are emptying the container just above. Introduced in 953d475274368ceed0c9584e71498a3cd2c93d41.

view details

Mateusz Mandera

commit sha 82660de59155cc53934f4f50c536f73c0a2a4cd1

ldap: Use zulip.ldap logger in ZulipLDAPUserPopulator.

view details

David Wood

commit sha f1c9d9c2fedbe7884be518276aff30a4378dc29e

integrations: Fix Thinkst Canary integration. This commit fixes the Thinkst Canary integration which - based on the schema in upstream documentation - incorrectly assumed that some fields would always be sent, which meant that the integration would fail. In addition, this commit adjusts support for canarytokens to only support the canarytoken schema with Thinkst Canaries (not Thinkst's canarytokens.org). Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha 366cb30db154ebc44db4f836dc67afd86a3f5293

integrations: Re-add Canarytoken integration. This commit re-adds the integration for canarytokens.org, now separate from the primary Thinkst integration. Signed-off-by: David Wood <david@davidtw.co>

view details

Anders Kaseorg

commit sha af3a79ab31c6a74cfe8d585c6f56cbf94f78e59c

zjquery: Fix ‘this’ parameter of invoked handlers. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha 2bbd8265b9fc54da4fcc9992339e0981e9b16459

zjquery: Fix event parameter of invoked handlers. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha bdeb07a6affe5df23b592a434211c9d4b54a00a1

zjquery: Refactor generic_event to wrap trigger. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha f10020b0fd13f1f418a4c19cd68b2959494cbfd9

zjquery: Let on, handle work with focus, focusin, blur, focusout events. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha 24aad216a664d2b0d935f9a523b30d3d19683faf

zjquery: Add change, keypress, scroll events. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha ce880ed2b465faac8bdae9607ef2e96239e6ae31

node_tests: search: Remove dead stub. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha de1107c1dd392b492711bfcdcb6e490377fe31c0

node_tests: Install handlers instead of mocking event triggering. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha 9102c5a519ff88c2810e439845de943ff5aa2282

node_tests: Trigger events instead of mocking handler installation. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha ded548ad167a6b9cd54731015f847ace515fe2df

zjquery: Refactor generic_event to wrap on. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha 3510dcbe5e463a22d4f21457a10b83a9d2db9f59

node_tests: Remove useless .select(noop) calls. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha 25883d7827bd1a09272e1430b443c27af88f3334

copy_and_paste: Replace deprecated jQuery.fn.bind. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha 97feea42a1f5e2c163a562b29a9ae4829a55054d

js: Replace deprecated jQuery.fn.hover. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

Anders Kaseorg

commit sha 4e42137bd9bad862b7e1195f8a214bd8a7e83450

js: Replace deprecated jQuery event handler shorthand. Signed-off-by: Anders Kaseorg <anders@zulip.com>

view details

push time in 6 days

delete branch davidtwco/zulip

delete branch : thinkst-integration-fixes

delete time in 6 days

pull request commentrust-lang/compiler-team

Update details of polymorphization working group

  • Initially, implement an analysis to detect when type parameters are unused in functions, closures and methods; and integrate this analysis into the monomorphization infrastructure so that less copies of functions are redundantly made (this addresses rust-lang/rust#46477).

Isn't this step already implemented now laughing

I guess it's technically implemented, but given that we've not enabled it yet, I've left this in.

davidtwco

comment created time in 6 days

pull request commentrust-lang/rust

polymorphisation: re-enable

@craterbot run mode=build-and-test

davidtwco

comment created time in 6 days

pull request commentrust-lang/rust

polymorphisation: re-enable

@craterbot abort

davidtwco

comment created time in 6 days

pull request commentrust-lang/rust

polymorphisation: re-enable

@craterbot check

davidtwco

comment created time in 6 days

PR opened rust-lang/compiler-team

Update details of polymorphization working group

This PR updates the details of the polymorphization working group now that my master's project has finished.

Merge alongside rust-lang/team#398.

+5 -5

0 comment

1 changed file

pr created time in 6 days

create barnchdavidtwco/compiler-team

branch : update-polymorphization-wg

created branch time in 6 days

delete branch davidtwco/team

delete branch : gh-pages

delete time in 6 days

PR opened rust-lang/team

Add polymorphization working group

Given that there is a little bit more work happening around polymorphisation recently and I've been asked about membership, I figured it would make sense to add the working group here for it.

cc @nikomatsakis @pnkfelix as compiler team leads

+12 -0

0 comment

1 changed file

pr created time in 6 days

push eventdavidtwco/compiler-team

Wesley Wiser

commit sha 221c85287a69b817e15328bfb728bec03660c826

Add weekly compiler team triage meeting notes for 2019-11-21

view details

Wesley Wiser

commit sha 125f399e541b5d8ce02b59022a136c2e7ae02526

Add notes for compiler team triage meeting on 2019-11-28

view details

Wesley Wiser

commit sha 429d6f731ca55463fbac8569f231c829c97cabc6

Add notes for compiler team triage meeting on 2019-12-05

view details

Santiago Pastorino

commit sha 8562d4760a8b561301453b6a35d8cef33795f939

Merge pull request #227 from rust-lang/wesleywiser-patch-1 Add weekly compiler team triage meeting notes for 2019-11-21

view details

Santiago Pastorino

commit sha 996e7489ead93b033ac5cfcfd408b0ac7d228e96

Merge pull request #228 from rust-lang/wesleywiser-patch-2 Add notes for compiler team triage meeting on 2019-11-28

view details

Santiago Pastorino

commit sha 89dbd3601bd5596e98c842a6aaa53975ef3583f9

Merge pull request #229 from rust-lang/wesleywiser-patch-3 Add notes for compiler team triage meeting on 2019-12-05

view details

Niko Matsakis

commit sha cfeb65c34dd814a478e92a59677eb048b58adcd3

summarize design meeting from 2019-12-20 on major change process

view details

Niko Matsakis

commit sha 2997ef19d7f993f0638c1771e347e3ab48e7b4b4

add minutes from 2019-12-06 meeting add metadata

view details

Niko Matsakis

commit sha 291c67ecbacb89113c49ca4eee9022dc1b1f63d7

Merge pull request #230 from nikomatsakis/2019-12-20-minutes summarize design meeting from 2019-12-20 on major change process

view details

Niko Matsakis

commit sha 44f0c360432a232e9f7129edfcdae5b7ca3d5ece

Merge pull request #231 from nikomatsakis/2019-12-06-end-to-end-query-PRs add minutes from 2019-12-06 meeting

view details

Niko Matsakis

commit sha 637a16e08a5d434ca8310c93f37f69bc86bda279

add some last minute updates

view details

Oliver Scherer

commit sha dabc62adb9350a9bca937f08e73d3b07af2277df

Create major_change.md

view details

Oliver Scherer

commit sha 0f49699d17095213ccb86d25ad6021af083c8af6

Apply suggestions from code review Co-Authored-By: Santiago Pastorino <spastorino@gmail.com>

view details

Aleksey Kladov

commit sha f4c3704bf0a156bbc35a8446991b06848188db56

Fix the link to the procedure in the template

view details

Wesley Wiser

commit sha e498def1a84b8acdc20484a35ab4dc9780869e16

Add notes for compiler team triage meeting on 2019-12-12

view details

Santiago Pastorino

commit sha 31807bcc92d0822a7f77f7afd343e2e595967997

Merge pull request #236 from rust-lang/Fix-issue-template Fix the link to the procedure in the template

view details

Santiago Pastorino

commit sha 8e622342330b13edc01882647c6ad3d213e623c6

Merge pull request #238 from rust-lang/wesleywiser-patch-1 Add notes for compiler team triage meeting on 2019-12-12

view details

Wesley Wiser

commit sha c45492c2ced3f2e35a1203f00c488478f586df34

Add compiler team triage meeting notes for 2019-12-19

view details

Santiago Pastorino

commit sha 8146dbc5c1dcc2cfe9a603c4595ee5c1831a43f5

Merge pull request #240 from rust-lang/wesleywiser-patch-1 Add compiler team triage meeting notes for 2019-12-19

view details

Wesley Wiser

commit sha 9e64c6e693e669cca739c27700b701f708a7fc43

Add notes for compiler team triage meeting on 2020-01-23

view details

push time in 6 days

create barnchdavidtwco/team

branch : polymorphization-wg

created branch time in 6 days

push eventdavidtwco/team

Santiago Pastorino

commit sha 633a3df66da1717c2a41ce342d5adf6bc55a267a

Add learning WG

view details

Niko Matsakis

commit sha f0a085c51d9989e7777ee048801af831092de6f2

create the "compiler contributors team" and populate it Contributors are added to the compiler-team mailing list, as well.

view details

Niko Matsakis

commit sha dce3f2a2280940b1618be11a4db4e9613c767523

sort names

view details

Niko Matsakis

commit sha 4f187a8d89721ac8619c7111ad9036532aca0b1f

add Nikita Popov

view details

Florian Gilcher

commit sha 8d014cb9c21fe75fbc96274ff11cff2040a0dbdb

Some text cleanup for the website

view details

Pietro Albini

commit sha 212f836160922b975ea2414312cb06a25c7b0b69

Merge pull request #68 from skade/fix-team-descriptions Some text cleanup for the website

view details

cad97

commit sha 912dc71f9904d4dd4e32f88862aaccf74bbefc31

Add self to wg-grammar

view details

Pietro Albini

commit sha 8dc126fb27f7bbae6c183b14e4d4d5c1b27d49d2

Merge pull request #69 from CAD97/master Add self to wg-grammar

view details

Niko Matsakis

commit sha 493ec0fc201e09b6eebde443ed621c025398bbb8

Merge pull request #62 from spastorino/add_learning_wg Add learning WG

view details

Niko Matsakis

commit sha 1b233cc420287661f5eb7779119ad503294e920d

add as a subteam of compiler

view details

Niko Matsakis

commit sha e0cc06f2f0cf0e41ef7e5cb0f4d11d4cabbc168e

remove explicit permissions that are redundant

view details

Niko Matsakis

commit sha 88deea018eea9004b62cd7154c46efddfc2c8cfb

give a description

view details

Niko Matsakis

commit sha 406b4ddb90d8ff597c1b107789a3b6c3a82e2253

Update teams/compiler-contributors.toml Co-Authored-By: Pietro Albini <pietro@pietroalbini.org>

view details

Niko Matsakis

commit sha fce58c596c5f3125fb8c427a0a548915e7c7133d

add people/flodiebold and people/lqd

view details

Niko Matsakis

commit sha 62faa2e8f5bb1323a3db7e12742e2aecc4d21b01

add flodiebold email

view details

Niko Matsakis

commit sha 8630f66b315c66f1999db948ab9ff77bc6d6bf59

set e-mail=false for remaining contributors

view details

Manish Goregaokar

commit sha 3e9683a0c16378f4131de748dac22d94a4b779fa

Add cargo run website-data

view details

Manish Goregaokar

commit sha f92d0c6eb55ca415cbfa215330fcfd33c8b23378

Enforce all teams have alphanumeric names

view details

Manish Goregaokar

commit sha 263a75cc38ea9b906a194e7396f13de19b31dbee

governance -> governance-team

view details

Manish Goregaokar

commit sha 883aaae5752a91fca7503deed09e983e6b01e7e6

Format

view details

push time in 6 days

pull request commentrust-lang/rust

polymorphisation: re-enable

@bors try

davidtwco

comment created time in 6 days

PR opened rust-lang/rust

polymorphisation: re-enable

Do not merge this PR! Before re-enabling polymorphisation, we're going to perform a crater run to make sure that there are no more regressions.

r? @lcnr

+2 -2

0 comment

1 changed file

pr created time in 6 days

create barnchdavidtwco/rust

branch : polymorphisation-re-enable

created branch time in 6 days

push eventdavidtwco/rust

Bastian Kauschke

commit sha 06dbd06e4deab2255d310d38ed0ea28becf43664

forbid `#[track_caller]` on main

view details

Nicholas Nethercote

commit sha eeb4b83289e09956e0dda174047729ca87c709fe

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

view details

Yuki Okushi

commit sha cd7204ef394d1e53bb967086186e9b8664d7e268

Forbid non-derefable types explicitly in unsizing casts

view details

Ivan Tham

commit sha c577d71e03cebb03d079670e8b9ce995fb79560b

Remove log alias from librustdoc

view details

Guillaume Gomez

commit sha 0275cd74096b71f6c641b06e73e6cb359303d6cc

Clean up E0745

view details

Felix Yan

commit sha 6d75d7c0843dc0f2b64b4427e3290222ef558227

Correct a typo in interpret/memory.rs

view details

Tim Diekmann

commit sha ab9362ad9a9b4b93951ccb577224dda367923226

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

view details

bors

commit sha d08eb98698cbce56e599324fb83d55eef2cac408

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

view details

Tim Diekmann

commit sha 929e37d4bfb2d6c99094a8a89c5feda47d25bbbe

Revert renaming of "memory block"

view details

Tim Diekmann

commit sha 93d98328d161bcdf002f9d2f7f916f01c6fce3b1

Revert missing "memory block"

view details

David Wood

commit sha 5f89f02c4e7d06dcb94434b8b30ce457b06eda5c

mir: use `FiniteBitSet<u32>` in polymorphization This commit changes polymorphization to return a `FiniteBitSet<u32>` rather than a `FiniteBitSet<u64>` because most functions do not use anywhere near sixty-four generic parameters so keeping a `u64` around is unnecessary in most cases. Signed-off-by: David Wood <david@davidtw.co>

view details

Rich Kadel

commit sha e0dc8dec273b4cba44a91c1b4433e3dcd117919f

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

view details

David Wood

commit sha 70b49c7bddec33e6972610e024fcbb3576aa9be3

metadata: skip empty polymorphization bitset This commit skips encoding empty polymorphization results - while polymorphization is disabled, this should be every polymorphization result; but when polymorphization is re-enabled, this would help with non-generic functions and those which do use all their parameters (most functions). Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha 63fadee21f4d3d7a07381dafc6cd2dfd644b5b02

mir: add debug assertion to check polymorphization This commit adds some debug assertions to `ensure_monomorphic_enough` which checks that unused generic parameters have been replaced with a parameter. Signed-off-by: David Wood <david@davidtw.co>

view details

Bastian Kauschke

commit sha 9127e27cec22cb130d0a96094196995d72b19030

tweak error message

view details

bors

commit sha f9d422ea78a4652c5d9ecd6b6d7577bdfbfd98a8

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

view details

Dan Gohman

commit sha 1a3e4d81406c700d90d6d482163b60c5efc18505

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

view details

bors

commit sha 07f1fdecfed85fe4be14b293eb913560a6cd60ba

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

view details

Eric Huss

commit sha 583133308ba82f4140c3d8b80ead7766d0f86906

Update books

view details

bors

commit sha 32d14eba47ee8bb0b5edb04bcf652517f81c4cf5

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

view details

push time in 6 days

delete branch davidtwco/rust

delete branch : polymorphization-incr-comp-optimisations

delete time in 6 days

push eventdavidtwco/rust

David Wood

commit sha 70b49c7bddec33e6972610e024fcbb3576aa9be3

metadata: skip empty polymorphization bitset This commit skips encoding empty polymorphization results - while polymorphization is disabled, this should be every polymorphization result; but when polymorphization is re-enabled, this would help with non-generic functions and those which do use all their parameters (most functions). Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha 63fadee21f4d3d7a07381dafc6cd2dfd644b5b02

mir: add debug assertion to check polymorphization This commit adds some debug assertions to `ensure_monomorphic_enough` which checks that unused generic parameters have been replaced with a parameter. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 7 days

pull request commentrust-lang/rust

polymorphization: various improvements

Fixed those nits, it was bugging me knowing that the PR had unresolved comments.

davidtwco

comment created time in 7 days

Pull request review commentrust-lang/rust

polymorphization: various improvements

 where                             unused_params.contains(index).map(|unused| !unused).unwrap_or(true);                         // Only recurse when generic parameters in fns, closures and generators                         // are used and require substitution.-                        if is_used && subst.needs_subst() {+                        match (is_used, subst.needs_subst()) {                             // Just in case there are closures or generators within this subst,                             // recurse.-                            if subst.super_visit_with(self) {+                            (true, true) if subst.super_visit_with(self) => {                                 // Only return when we find a parameter so the remaining substs                                 // are not skipped.                                 return true;                             }+                            // Confirm that polymorphization replaced the parameter with+                            // `ty::Param`/`ty::ConstKind::Param`.+                            (false, true) if cfg!(debug_assertions) => match subst.unpack() {+                                ty::subst::GenericArgKind::Type(ty) => {+                                    assert!(matches!(ty.kind, ty::Param(_)))+                                }+                                ty::subst::GenericArgKind::Const(ct) => {+                                    assert!(matches!(ct.val, ty::ConstKind::Param(_)))+                                }+                                _ => (),

Fixed!

davidtwco

comment created time in 7 days

push eventdavidtwco/rust

David Wood

commit sha b1c69cbc77ca410dcd476a5328138a4a58f3101d

metadata: skip empty polymorphization bitset This commit skips encoding empty polymorphization results - while polymorphization is disabled, this should be every polymorphization result; but when polymorphization is re-enabled, this would help with non-generic functions and those which do use all their parameters (most functions). Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha adea212201d98182ad6db8d47687685675023a24

mir: add debug assertion to check polymorphization This commit adds some debug assertions to `ensure_monomorphic_enough` which checks that unused generic parameters have been replaced with a parameter. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 7 days

Pull request review commentrust-lang/rust

polymorphization: various improvements

 pub fn provide(providers: &mut Providers) { /// Determine which generic parameters are used by the function/method/closure represented by /// `def_id`. Returns a bitset where bits representing unused parameters are set (`is_empty` /// indicates all parameters are used).-fn unused_generic_params(tcx: TyCtxt<'_>, def_id: DefId) -> FiniteBitSet<u64> {+fn unused_generic_params(tcx: TyCtxt<'_>, def_id: DefId) -> FiniteBitSet<u32> {

Fixed!

davidtwco

comment created time in 7 days

pull request commentrust-lang/rust

polymorphization: various improvements

Do you want to deal with my nits here?

I'll address those here but I won't get around to it until tomorrow (turned everything off for the day).

davidtwco

comment created time in 7 days

Pull request review commentrust-lang/rust

polymorphization: various improvements

 pub trait FiniteBitSetTy:     fn checked_shr(self, rhs: u32) -> Option<Self>; } +impl FiniteBitSetTy for u32 {+    const DOMAIN_SIZE: u32 = 128;

:man_facepalming: fixed!

davidtwco

comment created time in 7 days

Pull request review commentrust-lang/rust

polymorphization: various improvements

 pub trait FiniteBitSetTy:     fn checked_shr(self, rhs: u32) -> Option<Self>; } +impl FiniteBitSetTy for u32 {+    const DOMAIN_SIZE: u32 = 128;

:man_facepalming: fixed!

davidtwco

comment created time in 7 days

push eventdavidtwco/rust

David Wood

commit sha 5f89f02c4e7d06dcb94434b8b30ce457b06eda5c

mir: use `FiniteBitSet<u32>` in polymorphization This commit changes polymorphization to return a `FiniteBitSet<u32>` rather than a `FiniteBitSet<u64>` because most functions do not use anywhere near sixty-four generic parameters so keeping a `u64` around is unnecessary in most cases. Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha 4f8a0cbd013a156de832f5669125876f4be676f9

metadata: skip empty polymorphization bitset This commit skips encoding empty polymorphization results - while polymorphization is disabled, this should be every polymorphization result; but when polymorphization is re-enabled, this would help with non-generic functions and those which do use all their parameters (most functions). Signed-off-by: David Wood <david@davidtw.co>

view details

David Wood

commit sha e04073662a859e4077eef493751baf512cd3b35e

mir: add debug assertion to check polymorphization This commit adds some debug assertions to `ensure_monomorphic_enough` which checks that unused generic parameters have been replaced with a parameter. Signed-off-by: David Wood <david@davidtw.co>

view details

push time in 7 days

Pull request review commentrust-lang/rust

mir: add `used_generic_parameters_needs_subst`

+use rustc_middle::mir::interpret::InterpResult;+use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitor};+use std::convert::TryInto;++/// Returns `true` if a used generic parameter requires substitution.+crate fn ensure_monomorphic_enough<'tcx, T>(tcx: TyCtxt<'tcx>, ty: T) -> InterpResult<'tcx>+where+    T: TypeFoldable<'tcx>,+{+    debug!("ensure_monomorphic_enough: ty={:?}", ty);+    if !ty.needs_subst() {+        return Ok(());+    }++    struct UsedParamsNeedSubstVisitor<'tcx> {+        tcx: TyCtxt<'tcx>,+    };++    impl<'tcx> TypeVisitor<'tcx> for UsedParamsNeedSubstVisitor<'tcx> {+        fn visit_const(&mut self, c: &'tcx ty::Const<'tcx>) -> bool {+            if !c.needs_subst() {+                return false;+            }++            match c.val {+                ty::ConstKind::Param(..) => true,+                _ => c.super_visit_with(self),+            }+        }++        fn visit_ty(&mut self, ty: Ty<'tcx>) -> bool {+            if !ty.needs_subst() {+                return false;+            }++            match ty.kind {+                ty::Param(_) => true,+                ty::Closure(def_id, substs)+                | ty::Generator(def_id, substs, ..)+                | ty::FnDef(def_id, substs) => {+                    let unused_params = self.tcx.unused_generic_params(def_id);+                    for (index, subst) in substs.into_iter().enumerate() {+                        let index = index+                            .try_into()+                            .expect("more generic parameters than can fit into a `u32`");+                        let is_used =+                            unused_params.contains(index).map(|unused| !unused).unwrap_or(true);+                        // Only recurse when generic parameters in fns, closures and generators+                        // are used and require substitution.+                        if is_used && subst.needs_subst() {+                            // Just in case there are closures or generators within this subst,+                            // recurse.+                            if subst.super_visit_with(self) {+                                // Only return when we find a parameter so the remaining substs+                                // are not skipped.+                                return true;+                            }+                        }

Implemented this in #75155.

davidtwco

comment created time in 7 days

pull request commentrust-lang/rust

Disable polymorphisation

Thanks! Is that something we could plausibly "fix", or does that seem too hard?

I think both of these suggestions make sense, I've implemented them in #75155.

davidtwco

comment created time in 7 days

PR opened rust-lang/rust

polymorphization: various improvements

This PR includes a handful of polymorphisation-related changes:

  • @Mark-Simulacrum's suggestions from this comment:
    • Use a FiniteBitSet<u32> over a FiniteBitSet<u64> as most functions won't have 64 generic parameters.
    • Don't encode polymorphisation results in metadata when every parameter is used (in this case, just invoking polymorphisation will probably be quicker).
  • @lcnr's suggestion from this comment.
    • Add an debug assertion in ensure_monomorphic_enough to make sure that polymorphisation did what we expect.

r? @lcnr

+54 -15

0 comment

7 changed files

pr created time in 7 days

create barnchdavidtwco/rust

branch : polymorphization-incr-comp-optimisations

created branch time in 7 days

pull request commentrust-lang/rust

Disable polymorphisation

#69749 was a perf loss, but disabling polymorphization was mostly neutral. @davidtwco: is that expected?

@davidtwco, @wesleywiser -- could someone follow up on this being a performance-neutral PR? Thanks!

@njn @Mark-Simulacrum Apologies for the delay in looking into this - this was surprising but I think it makes sense; I did some local benchmarking of the PR which landed polymorphisation (with -Zpolymorphisation=off) and the merge before that.

I believe that the majority of the losses that we didn't win back are from cross-crate metadata/incr-comp changes - -Zpolymorphize=off makes unused_generic_params always return every-parameter-is-used, but that result is still serialized - there was nothing to serialize without polymorphisation having landed. Analysing perf results isn't something I've got much experience with, but as far as I can tell, this explains the inconsistency here.

davidtwco

comment created time in 7 days

issue commentrust-lang/rust

`extern crate ... as std` overrides the injected crate on 2018 edition

Opened #75145 which fixes this.

matthewjasper

comment created time in 7 days

issue commentrust-lang/rust

Preallocate `DefId`s for lang items and use lang items in lowering

Opened #75145 to resolve this using @matthewjasper's earlier work.

oli-obk

comment created time in 7 days

PR opened rust-lang/rust

Issue 60607 preallocate defid for lang items

Fixes #60607 and fixes #61019.

This PR introduces QPath::LangItem to the HIR and uses it in AST lowering instead of constructing a hir::Path from a slice of symbols:

  • Credit for much of this work goes to @matthewjasper, I basically just rebased their earlier work.
  • Changes to Clippy might not be correct, they compile but attempting to run tests through ./x.py produced failures which appeared spurious, so I didn't run any clippy tests.
  • Changes to save analysis might not be correct - tests pass but I don't have a lot of confidence in those changes being correct.
  • I've used GenericBounds::LangItemTrait rather than changing PolyTraitRef, as suggested by @matthewjasper in this comment but I'd prefer that be left for a follow-up.

r? @oli-obk cc @matthewjasper

+479 -328

0 comment

47 changed files

pr created time in 7 days

create barnchdavidtwco/rust

branch : issue-60607-preallocate-defid-for-lang-items

created branch time in 7 days

push eventdavidtwco/rust

Tim Diekmann

commit sha 076ef66ba2f647a627806f376c23b332fb04d3ff

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

view details

Alex Crichton

commit sha 2c1b0467e02a763a61335b8acb3c29524bcb9e6d

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

view details

Erik Desjardins

commit sha c596e01b8ea34bb46444005425cd5aa825515f7b

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

view details

Tim Diekmann

commit sha b01fbc437eae177cd02e7798f2f1454c1c6ed6e5

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

view details

carbotaniuman

commit sha 784dd22aac3f58eebc73ff54ae0ea43682392e68

add `unsigned_abs` to signed integers

view details

Tim Diekmann

commit sha 9cd9286e20e6fe4cdb7e298fa5ec966eb26fa32b

Update doc-comment for grow_zeroed

view details

Tim Diekmann

commit sha db7d07b83bee302be977468caa6931f651b4f77a

Remove a trailing whitespace

view details

Stein Somers

commit sha f5c47fa44d64b7ae529147f9b0122b7ecda1bd92

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

view details

Lukas Wirth

commit sha 35d6a2ef2ba71d5ea120c2879825968babcf9a89

Lint path statements to use drop for drop types

view details

Stein Somers

commit sha 532e7f49fc6719528d37f69373aec821b09cd478

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

view details

Tim Diekmann

commit sha 24ddf76ed7bc453826e6e843cd0ca289e02185f1

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

view details

Joshua Nelson

commit sha e97e6fbe343d0afac795e6c13201ce31047dc219

Fix logging for rustdoc

view details

Yuki Okushi

commit sha 2e5c50195aa0345e174ff9970ec58b7e154c0132

Do not trigger `unused_braces` for `while let`

view details

kennytm

commit sha fd7596c9a538b3c51f2d55c2d5f6ef881e6ba742

fix broken git commit in stdarch

view details

bors

commit sha c186aed59ab590eb586751afaf6b9e0ea9b78099

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

view details

David Sonder

commit sha f130e18c01a0108af23710418d8fb9eddb7647e1

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

view details

Mark Rousskov

commit sha d2fc809fdb2e92581a0ecd70dec3e179dbd3439a

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

view details

bors

commit sha 829d69b9c6bfc535a92fc290ec9391a0d5af6c81

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

view details

Mateusz Mikuła

commit sha 594f81a2b4dae23827271ea3a4bbb21c1a0004e1

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

view details

Aaron Hill

commit sha 6deda6a6a05e6e6ace8fb015d610c6355efb0fd7

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

view details

push time in 7 days

PR opened rust-lang/rust

lint/ty: move fns to avoid abstraction violation

This PR moves transparent_newtype_field and is_zst to LateContext where they are used, rather than being on the VariantDef and TyS types, hopefully addressing @eddyb's concern from this comment.

+31 -22

0 comment

4 changed files

pr created time in 8 days

create barnchdavidtwco/rust

branch : is-zst-abstraction-violation

created branch time in 8 days

delete branch davidtwco/rust

delete branch : polymorphize-analysis

delete time in 8 days

delete branch davidtwco/rust

delete branch : issue-74636-polymorphized-closures-inherited-params

delete time in 8 days

delete branch davidtwco/rust

delete branch : issue-74745-pprust-regression-test

delete time in 8 days

more