profile
viewpoint

emberian/this-week-in-rust 526

Data for this-week-in-rust.org

Gankra/collect-rs 66

Miscellaneous Collections

Gankra/hash-rs 23

Benchmarks of various hashers

Gankra/gif-rs 10

eats a gif, spits out fully decoded frames

Gankra/cargo-crusader 2

Test the downstream impact of Rust crate changes before publishing

emilio/bindgen-talk 1

https://www.meetup.com/Rust-Berlin/events/252872742/

Gankra/chrexam 1

fuck you

Gankra/geo-kit 1

A collection of algorithms and tools for geometric problem solving in HTML5

pull request commentrust-lang/cargo

Mask out system core.autocrlf settings before resetting git repos

yep, wanted another trailing comma

Gankra

comment created time in 15 days

push eventGankra/cargo

Alexis Beingessner

commit sha 4a1e71072d8eee5647054768e092d3a2484d2dae

Mask out system core.autocrlf settings before resetting git repos This fixes an issue the gecko developers noticed when vendoring on windows. [0] If a user has `core.autocrlf=true` set (a reasonable default on windows), vendoring from a git source would cause all the newlines to be rewritten to include carriage returns, creating churn and platform-specific results. To fix this, we simply set the global cargo checkout's "local" core.autocrlf value before performing a `reset`. This masks out the system configuration without interfering with the user's own system/project settings. [0]: https://bugzilla.mozilla.org/show_bug.cgi?id=1647582

view details

push time in 15 days

pull request commentrust-lang/cargo

Mask out system core.autocrlf settings before resetting git repos

ok, the test now actually sets up a gitconfig, thanks @ehuss!

Gankra

comment created time in 15 days

push eventGankra/cargo

Alexis Beingessner

commit sha d0dd8491d5920cbf68bbcb7e9723ea40412c1247

Mask out system core.autocrlf settings before resetting git repos This fixes an issue the gecko developers noticed when vendoring on windows. [0] If a user has `core.autocrlf=true` set (a reasonable default on windows), vendoring from a git source would cause all the newlines to be rewritten to include carriage returns, creating churn and platform-specific results. To fix this, we simply set the global cargo checkout's "local" core.autocrlf value before performing a `reset`. This masks out the system configuration without interfering with the user's own system/project settings. [0]: https://bugzilla.mozilla.org/show_bug.cgi?id=1647582

view details

push time in 15 days

Pull request review commentrust-lang/cargo

Mask out system core.autocrlf settings before resetting git repos

 fn config_instructions_works() {         .with_stderr_contains("[..]foo/vendor/gitdep/src/lib.rs[..]")         .run(); }++#[cargo_test]+fn git_crlf_preservation() {+    // Check that newlines don't get changed when you vendor+    // (will only fail if your system is setup with core.autocrlf=true on windows)

Is the mocking sufficiently robust that this won't mess up the user's system?

Gankra

comment created time in 15 days

create barnchGankra/cargo

branch : crlf

created branch time in 15 days

pull request commentrust-lang/cargo

Mask out system core.autocrlf settings before resetting git repos

It wasn't clear to me how I could reliably reproduce my test on any machine, but I did make sure it failed without my changes and a system autocrlf=true.

Gankra

comment created time in 15 days

PR opened rust-lang/cargo

Mask out system core.autocrlf settings before resetting git repos

This fixes an issue the gecko developers noticed when vendoring on windows. 0 If a user has core.autocrlf=true set (a reasonable default on windows), vendoring from a git source would cause all the newlines to be rewritten to include carriage returns, creating churn and platform-specific results.

To fix this, we simply set the global cargo checkout's "local" core.autocrlf value before performing a reset. This masks out the system configuration without interfering with the user's own system/project settings.

+39 -0

0 comment

2 changed files

pr created time in 15 days

push eventrust-lang/nomicon

Konrad Borowski

commit sha b8344ef88f0a973b876bf1d783683a74d1da0139

Remove language-level UB for non-UTF-8 str

view details

Konrad Borowski

commit sha bfe1ab96d717d1dda50e499b360f2e2f57e1750a

Clarify that str data must still be initialized

view details

push time in 2 months

PR merged rust-lang/nomicon

Remove language-level UB for non-UTF-8 str

This matches https://github.com/rust-lang/reference/pull/792

+6 -7

0 comment

1 changed file

xfix

pr closed time in 2 months

push eventrust-lang/nomicon

Ralf Jung

commit sha c94172314b85c0dcc5031e66095293ebeaeb3b45

fix Nomicon transmute UB

view details

push time in 2 months

PR merged rust-lang/nomicon

fix Nomicon transmute UB

The fact that the Nomicon says "Transmuting between non-repr(C) types is UB" regularly leads to confusion, so let's fix that.

+23 -9

3 comments

1 changed file

RalfJung

pr closed time in 2 months

pull request commentcontain-rs/vec-map

2018 edition

thanks!

camsteffen

comment created time in 2 months

push eventcontain-rs/vec-map

Cameron Steffen

commit sha f65bd11e248cc8fd0dfc96c3fdef62b925572c53

Run cargo fix

view details

Cameron Steffen

commit sha 5150c707d6ad33c8a85716b6af8d6baaf3030cc6

Change to 2018 edition

view details

Cameron Steffen

commit sha 486c601e2982607483962a311c3740d21b795675

Warn 2018 idioms

view details

Cameron Steffen

commit sha 2fa9ca625ebd45893d155a6fa683a994d860ba1f

Fix 2018 idioms

view details

Alexis Beingessner

commit sha 8089771dea0f93aed17dba961497aa32ac89442d

Merge pull request #45 from camsteffen/2018 2018 edition

view details

push time in 2 months

PR merged contain-rs/vec-map

2018 edition
  • Set edition to 2018 in toml
  • Add #![warn(rust_2018_idioms)]
  • Fix all warnings
+22 -20

0 comment

2 changed files

camsteffen

pr closed time in 2 months

push eventcontain-rs/vec-map

Brian Foley

commit sha 6c1f810910e3a09926ed4d69f5e6ac995cf14f9a

Add changelog to capture version history

view details

Alexis Beingessner

commit sha d3bc07c4750e03e10af5315d9653ae396177dfeb

Merge pull request #43 from bpfoley/changelog Add changelog to capture version history

view details

push time in 2 months

PR merged contain-rs/vec-map

Add changelog to capture version history
+62 -0

0 comment

1 changed file

bpfoley

pr closed time in 2 months

issue closedcontain-rs/trie

Currently does not compile due to bit-vec v0.5.1 breaking ordered_iter

Currently does not compile due to bit-vec v 0.5.1 breaking ordered_iter Upon fixing bit-vec dependency to current 0.6.2 trie breaks with a couple of of lifetime errors.

closed time in 2 months

ZoomRmc

issue commentcontain-rs/trie

Currently does not compile due to bit-vec v0.5.1 breaking ordered_iter

0.2.1 published with a fix.

i have also released a fix for ordered_iter

ZoomRmc

comment created time in 2 months

push eventcontain-rs/trie

Alexis Beingessner

commit sha d1d9d991d7386c7530a83f9d48d5ec4249e988b2

0.2.1 release

view details

push time in 2 months

push eventcontain-rs/ordered_iter

Alexis Beingessner

commit sha 49ce52fe8ef84693c8603755b7e74d84bfd3a2db

0.1.2 release

view details

push time in 2 months

push eventGankra/gankra.github.io

Alexis Beingessner

commit sha 31c793a2c075a06f79859b7c01167edc9b4b0e43

homestuck

view details

push time in 3 months

PR merged rust-lang/nomicon

Rename Unique::empty to Unique::dangling

Renamed in https://github.com/rust-lang/rust/pull/71597. Fixes toolstate.

+9 -9

0 comment

4 changed files

ehuss

pr closed time in 3 months

push eventrust-lang/nomicon

Eric Huss

commit sha d1517d4e3f29264c5c67bce2658516bb5202c800

Rename Unique::empty to Unique::dangling

view details

push time in 3 months

issue commentrust-lang/rust

Tracking issue for RFC 2582, `&raw [mut | const] $place`

I also agree &raw is a healthy improvement over the status quo that should be made available as soon as possible.

In particular I like that this tiny step includes the clunkiness of &raw const for two reasons:

  • Being slightly longer means folks are still subtly encouraged to make &raw mut and avoid the aforementioned const provenance issues. (and folks who want the variance properties of const pointers probably also want to use NonNull, so those folks are already funneled into creating mutable ptrs)

  • It leaves us ample room to introduce (in a later edition) a hypothetical unified raw pointer that just uses unqualified &raw. (Not something I'm super hopeful about these days but I like that this door isn't closed)

Centril

comment created time in 3 months

issue commentrust-lang/nomicon

Are the HRTB really needed in the given example ?

hmm yea, i think the new borrowchecker and/or some new sugar was added since this section was written which makes this not actually a good example anymore. Will have to think...

shika-blyat

comment created time in 3 months

issue commentrust-lang/rust

Tracking issue for RFC 2582, `&raw [mut | const] $place`

For the sake of end-user documentation, I'd like a clarification on this loose note at the end of the RFC:

Lowering of casts. Currently, mut_ref as *mut _ has a reborrow inserted, i.e., it gets lowered to &mut *mut_ref as *mut _. It seems like a good idea to lower this to &raw mut *mut_ref instead to avoid any effects the reborrow might have in terms of permitted aliasing. This has the side-effect of being able to entirely remove reference-to-pointer-casts from the MIR; that conversion would be done by a "raw reborrow" instead (which is consistent with the pointer-to-reference situation).

I believe this is in reference to a historical spookiness in the language that mutable_ref as *mut as *const is actually semantically different from mutable_ref as *const -- the former creating a mutable pointer which is legal to write to, while the latter doesn't (roughly speaking). I was under the impression that this distinction was miserably Actually Important. Is that no longer the orthodoxy among the UCG folks?

Centril

comment created time in 3 months

PR merged rust-lang/nomicon

Replace catch_panic by catch_unwind

Fixes #212

+3 -1

2 comments

1 changed file

dbdr

pr closed time in 3 months

push eventrust-lang/nomicon

Daniel Bonniot de Ruisselet

commit sha 76d0799a8df8cc7821b06e561899b1f17c3381ba

Replace catch_panic by catch_unwind

view details

dbdr

commit sha 91dd12be34065746fba5b6c8fafcff3c45abb59f

Use simpler link syntax Thanks @lzutao Co-authored-by: lzutao <taolzu@gmail.com>

view details

push time in 3 months

issue closedrust-lang/nomicon

catch_panic => catch_unwind

The Unwinding chapter refers to a catch_panic. As far as I could tell, that function has been replaced in 1.9 by std::panic::catch_unwind. Besides the name change, should this affect the content of the chapter?

closed time in 3 months

dbdr

pull request commentrust-lang/nomicon

Replace catch_panic by catch_unwind

It's now Unique::dangling: https://github.com/rust-lang/rust/commit/97a8870022ec819c8b92b4c192242726c77e19f3

but yea, was broken before you got here

dbdr

comment created time in 3 months

issue commentrust-lang/nomicon

Missing explanation of 'Bivariant' in 'Subtyping and Variance' section

Additional Note For History Lawyers: user-defined types which were bivariant wrt their type parameters was supported pre-rust-1.0. It was a huge footgun so we removed it. I have no interest in discussing pre-1.0 Rust in the Rustonomicon, as literally every feature you could imagine was at one point part of Rust 0.x.

JOE1994

comment created time in 3 months

issue commentrust-lang/nomicon

Missing explanation of 'Bivariant' in 'Subtyping and Variance' section

Just to be a bit more clear: the reason I say it's a distraction to discuss is because it's a compiler error to create a type that "would" be bivariant wrt one of its type parameters. Hence why you sometimes need to add a PhantomData<T> to a struct to "pick" one of the other variances.

JOE1994

comment created time in 3 months

issue closedrust-lang/nomicon

Missing explanation of 'Bivariant' in 'Subtyping and Variance' section

Enum rustc::ty::Variance contains 4 variants as below.

pub enum Variance {
    Covariant,
    Invariant,
    Contravariant,
    Bivariant,
}

The current version of the Subtyping and Variance section only explains the first 3 variants of the enum Variance as below.

A type constructor F's variance is how the subtyping of its inputs affects the subtyping of its outputs. There are three kinds of variance in Rust. Given two types Sub and Super, where Sub is a subtype of Super:

I found articles that briefly explain the concept of Bivariant that could be of reference.

closed time in 3 months

JOE1994

issue commentrust-lang/nomicon

Missing explanation of 'Bivariant' in 'Subtyping and Variance' section

Bivariance does not exist as an end-user concept. Or at least, it's easily understood otherwise, and is just used as a thing to make things "just work" in the compiler.

In the Rustonomicon we talk about a type being variant with respect to a type parameter. For a type which has no relationship to a type parameter (such as an i32 wrt some <T> that's in scope), you can take two stances:

  1. Ignore that type, because it has no effect
  2. The type is bivariant wrt T... which just means it has no effect

The rustonomicon silently takes position (1) because it would be a distraction to discuss, while the compiler takes position (2) because it makes the algorithm easier to express technically (a type's variance is the lower bound of all its fields' variances, computable with a simple fold).

Either way the result is the same. It's just whether you want to represent something as Option<3CaseEnum> or 4CaseEnum.

JOE1994

comment created time in 3 months

push eventcontain-rs/ordered_iter

Allen Welkie

commit sha 228bf64d8723cd91bfb923ca2d382b00f53043a6

Bump bit-vec to ~0.6

view details

Alexis Beingessner

commit sha 1f8e2f1ec96b0dd54d327e25b40587d7c00ab42a

Merge pull request #13 from awelkie/master Bump bit-vec to ~0.6

view details

push time in 3 months

PR merged contain-rs/ordered_iter

Bump bit-vec to ~0.6

This fixes the following compilation error:

error[E0277]: the trait bound `B: bit_vec::BitBlock` is not satisfied
   --> src/lib.rs:285:32
    |
285 | impl<'a, B: bit_vec::BitBlock> OrderedSetIterator for bit_set::Iter<'a, B> {}
    |                                ^^^^^^^^^^^^^^^^^^ the trait `bit_vec::BitBlock` is not implemented for `B`
    |
help: consider further restricting this bound with `+ bit_vec::BitBlock`
   --> src/lib.rs:285:13
    |
285 | impl<'a, B: bit_vec::BitBlock> OrderedSetIterator for bit_set::Iter<'a, B> {}
    |             ^^^^^^^^^^^^^^^^^
    = note: required because of the requirements on the impl of `std::iter::Iterator` for `bit_set::Iter<'a, B>`

error: aborting due to previous error

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

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

which stems from having two different versions of bit-vec in the dependency tree.

+1 -1

0 comment

1 changed file

awelkie

pr closed time in 3 months

PR closed rust-unofficial/too-many-lists

feat(first-drop): Simplify loop and let rust use partial moves

The drop function does not need to use mem::replace in the while loop. A more concise expression is possible.

+2 -2

1 comment

1 changed file

rahulverma

pr closed time in 3 months

pull request commentrust-unofficial/too-many-lists

feat(first-drop): Simplify loop and let rust use partial moves

thanks for the suggestion!

i'd rather keep this code simpler to understand at this early in the book. we're purposefully doing things clumsily to avoid overloading the reader with new concepts all at once.

rahulverma

comment created time in 3 months

push eventrust-unofficial/too-many-lists

Li Xuanji

commit sha 93c76ab6064911689edaee41f0fc20335d886092

use commas and clarify allocation in foolish list

view details

push time in 3 months

PR merged rust-unofficial/too-many-lists

use commas and clarify allocation in foolish list
  • The node with junk should have a comma, similar to the other nodes
  • Make clear that "allocated" means "heap-allocated"
+2 -2

0 comment

1 changed file

ldct

pr closed time in 3 months

issue commentrust-lang/nomicon

catch_panic => catch_unwind

nope, just a name change is needed.

dbdr

comment created time in 3 months

pull request commentcontain-rs/linked-hash-map

Fix mem::uninitialized UB warning

whoops sorry, fixed

SpaceManiac

comment created time in 3 months

push eventrust-unofficial/too-many-lists

Li Xuanji

commit sha a970448b4f7903fc3fa39d3d478beea75892827a

add syntax highlighting

view details

push time in 3 months

Pull request review commentcontain-rs/bit-vec

fix #63

 impl<B: BitBlock> BitVec<B> {             		let last = self.storage.last_mut().unwrap();                 	*last = *last | (block << b);                 }-                self.storage.push(block >> (B::bits() - b));+                let new_block = block >> (B::bits() - b);++                if new_block != B::zero() {+                    self.storage.push(new_block);+                }             }

This seems extremely incorrect? A huge string of 0's is a valid value for a BitVec to contain, and this implementation drops every block of 0's??

yberreby

comment created time in 8 months

issue commentrust-lang/rust

Tracking Issue for RFC 213: Default Type Parameter Fallback

I think we should "unaccept" the RFC to make it clear this needs to be redesigned from the ground up, go through RFCs again.

jroesch

comment created time in 3 months

pull request commenteqrion/cbindgen

ir: Allow per-method annotations for all the auto-generated methods.

sorry, still ramping back into new responsibilities, will try to watch gh this stuff more closely now!

emilio

comment created time in 3 months

pull request commentcontain-rs/linked-hash-map

Fix mem::uninitialized UB warning

Done.

SpaceManiac

comment created time in 3 months

push eventcontain-rs/vec-map

Alexis Beingessner

commit sha 9509befa7bc96a7f8bd202cc472dc9ecc23be890

0.8.2 release

view details

push time in 3 months

push eventcontain-rs/bit-set

Alexis Beingessner

commit sha 5787cdfa8c03074ae59e5a9fec175dfe97190730

0.5.1 release

view details

Alexis Beingessner

commit sha c911b6d986debd4b7369ee8214a4a51aee5f55b1

Merge branch 'master' of github.com:contain-rs/bit-set

view details

Alexis Beingessner

commit sha 8ba6d0d96e9df714d55167b7b6ccde96885cf46d

0.5.2 release

view details

push time in 3 months

push eventcontain-rs/bit-vec

Alexis Beingessner

commit sha 219e4804504cf22f7c707352ad460d3ad9aa09df

0.6.2 release

view details

push time in 3 months

push eventcontain-rs/linked-hash-map

Alexis Beingessner

commit sha f1ee0d032368e4912af9d4620bd0ec3857838f2e

0.5.3 release

view details

push time in 3 months

issue commentrust-lang/rust

Use lld by default on x64 msvc windows

Yes, as noted in the main comment (which I update to track current status) the infra is already hooked up here for invoking it. It's just a bit buggy, and requires a more thorough investigation of failure-modes and how we can smooth them over, e.g.:

  • if you don't have Visual C++ installed what happens?
  • do we provide lld-link.exe, or do we look for a system one? both? is
  • does it work just as well on win 8 and 7? should we restrict efforts to win 10?
  • can we directly invoke the lld-link binary on macos/linux when cross-compiling to windows?
  • how important are the missing features on the lld-link status page? can we recover and fallback to link when encountering them?

Once someone's done a quick audit of basic failure modes, we should do some community outreach asking people to test -C linker=lld and report how it affects their build times (clean build, big change incremental, tiny change incremental, etc.).

Definitely looking for someone to champion this effort, since my primary goal was just creating more focused initiatives / clarifying the status confusion in the main lld bug.

Gankra

comment created time in 3 months

more