profile
viewpoint
Jonas Schievink jonas-schievink Chief Curse Officer @ferrous-systems Berlin, Germany compilers; embedded systems; emulators; Linux; please do not send me blockchain recruiting emails

dac-gmbh/serde_postgres 51

Easily Deserialize Postgres rows.

dac-gmbh/golomb-set 28

A Golomb Coded Set implementation in Rust

dac-gmbh/mail 21

mail, facade for a number of mail related crates for creating and sending mails

dac-gmbh/derefable 16

Automatically derive Deref/DerefMut implementations in Rust.

jonas-schievink/aligned_alloc.rs 14

Aligned allocation for Rust

dac-gmbh/new-tokio-smtp 13

extendible SMTP (Simple Mail Transfer Protocol) implementation using tokio

helium/longfi-device 11

C library of device-side LongFi Protocol

dac-gmbh/asn1 10

An implementation of the ITU ASN.1 (X.680–X.699) specifications in Rust.

dac-gmbh/hyperdrive 6

Declarative HTTP request routing, guarding and decoding

dac-gmbh/gbl 5

GBL firmware file manipulation library

push eventjonas-schievink/nixos-config

Jonas Schievink

commit sha 535fcd6000f7f4fdf6b9192a7109109e202e3a84

cerium: use 20.03

view details

push time in 14 minutes

pull request commentrust-embedded/cross

aarch64-unknown-linux-musl: do not set RUSTFLAGS

@reitermarkus this doesn't look spurious to me

jonas-schievink

comment created time in an hour

issue commentrust-analyzer/rust-analyzer

improve latency of goto definition

Is there anyway to force RA to build its goto-definition index once it starts?

This is now done. You should see an "indexing" progress indicator on startup.

BurntSushi

comment created time in an hour

push eventjonas-schievink/nixos-config

Jonas Schievink

commit sha edc7956f0d6a2f8196d256f59cf768776bcbe458

move cerium

view details

push time in an hour

issue commentrust-lang/rust

Excessive memory usage building GTK Rust, a problem for entry level devices for newcomers (e.g. Raspberry PI 3+)

Try passing -j1 to Cargo if you aren't already. Or run ninja -j1 instead of just ninja, that might also help.

ell1e

comment created time in 2 hours

delete branch jonas-schievink/rust

delete branch : rollup-epcww30

delete time in 2 hours

PR closed rust-lang/rust

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

Successful merges:

  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78243 (--test-args flag description)
  • #78249 (improve const infer error)
  • #78250 (Document inline-const)
  • #78264 (Add regression test for issue-77475)
  • #78268 (Do not try to report on closures to avoid ICE)
  • #78274 (Update description of Empty Enum for accuracy)
  • #78278 (move visit_predicate into TypeVisitor)
  • #78293 (Always store Rustdoc theme when it's changed)
  • #78309 (Fix Ubuntu download URL)

Failed merges:

r? @ghost

+267 -73

5 comments

23 changed files

jonas-schievink

pr closed time in 2 hours

pull request commentrust-lang/rust

Do not try to report on closures to avoid ICE

@bors r- failed in https://github.com/rust-lang/rust/pull/78311#issuecomment-715619139

JohnTitor

comment created time in 2 hours

PR closed rust-analyzer/rust-analyzer

Use string_cache to intern `Name`s

This only saves a very small amount of memory, so I'm not sure if this is worth it.

master:
Total: 23.714440996s, 1180mb allocated 1269mb resident

this branch:
Total: 24.092274156s, 1128mb allocated 1240mb resident
+345 -262

0 comment

12 changed files

jonas-schievink

pr closed time in 2 hours

delete branch jonas-schievink/rust-analyzer

delete branch : cfg-body

delete time in 3 hours

delete branch jonas-schievink/rust

delete branch : rollup-d4emvwm

delete time in 3 hours

PR closed rust-lang/rust

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

Successful merges:

  • #75115 (#[deny(unsafe_op_in_unsafe_fn)] in sys/cloudabi)
  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #77830 (Simplify query proc-macros)
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78249 (improve const infer error)
  • #78250 (Document inline-const)
  • #78264 (Add regression test for issue-77475)
  • #78268 (Do not try to report on closures to avoid ICE)
  • #78274 (Update description of Empty Enum for accuracy)
  • #78278 (move visit_predicate into TypeVisitor)
  • #78293 (Always store Rustdoc theme when it's changed)

Failed merges:

r? @ghost

+592 -415

10 comments

38 changed files

jonas-schievink

pr closed time in 3 hours

pull request commentrust-lang/rust

Fix Ubuntu download URL

Rolling up in #78311

jonas-schievink

comment created time in 3 hours

pull request commentrust-lang/rust

Fix Ubuntu download URL

@bors retry

jonas-schievink

comment created time in 3 hours

pull request commentrust-lang/rust

Rollup of 14 pull requests

@bors p=2000

jonas-schievink

comment created time in 3 hours

pull request commentrust-lang/rust

Rollup of 14 pull requests

@bors r+ rollup=never p=14

@rustbot modify labels: rollup

jonas-schievink

comment created time in 3 hours

PR opened rust-lang/rust

Rollup of 14 pull requests

Successful merges:

  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78243 (--test-args flag description)
  • #78249 (improve const infer error)
  • #78250 (Document inline-const)
  • #78264 (Add regression test for issue-77475)
  • #78268 (Do not try to report on closures to avoid ICE)
  • #78274 (Update description of Empty Enum for accuracy)
  • #78278 (move visit_predicate into TypeVisitor)
  • #78293 (Always store Rustdoc theme when it's changed)
  • #78309 (Fix Ubuntu download URL)

Failed merges:

r? @ghost

+267 -73

0 comment

23 changed files

pr created time in 3 hours

push eventjonas-schievink/rust

Jonas Schievink

commit sha f3265fec7a46d2aa31df120ba737942b51579302

Fix Ubuntu download URL

view details

Jonas Schievink

commit sha 5f61b5596f947c35590ba96778ee05b4f39a82ee

Rollup merge of #78309 - jonas-schievink:fix-ci, r=pietroalbini Fix Ubuntu download URL

view details

push time in 3 hours

push eventjonas-schievink/rust

nasso

commit sha a0ce1e095e0d89d35ff3de20541dd4faf79607da

Always store Rustdoc theme when it's changed

view details

Jonas Schievink

commit sha d48f44997d731bbf756ee876ebb86167d71d128a

Rollup merge of #78293 - nasso:master, r=GuillaumeGomez Always store Rustdoc theme when it's changed `switchTheme` (too) lazily updated the value of `rustdoc-theme` in `localStorage`, leading to an incorrect stored value when the system theme is the same as the default (`light`) theme. Fixes #78273

view details

push time in 3 hours

push eventjonas-schievink/rust

Bastian Kauschke

commit sha 972d9e886ca8787b2b4223bd39a76ff0250dfcaf

move `visit_predicate` into `TypeVisitor`

view details

Jonas Schievink

commit sha f7a56d72c90708432092b98edc12dbcae2125403

Rollup merge of #78278 - lcnr:predicate-visit, r=matthewjasper move `visit_predicate` into `TypeVisitor` Seems easier than dealing with `PredicateVisitor` for me which I needed for object safety checks for `PredicateAtom::ConstEvaluatable`. Is there a reason I am missing for this split? r? @matthewjasper

view details

push time in 3 hours

push eventjonas-schievink/rust

Eduardo Pinho

commit sha efedcb23447a805fad841c4e38d5dea0d53ec3c7

Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

Jonas Schievink

commit sha 0fee32549eb3ed752846639ba8a38d0941ecbcee

Rollup merge of #78274 - Enet4:patch-1, r=jonas-schievink Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

push time in 3 hours

push eventjonas-schievink/rust

Yuki Okushi

commit sha 50e34d6d658c4906a3292385b1962a3c26ce24c4

Do not try to report on closures to avoid ICE

view details

Jonas Schievink

commit sha 90aa72bf5fcc05346b629bd32b95fc9b0c1fb699

Rollup merge of #78268 - JohnTitor:issue-78262, r=estebank Do not try to report on closures to avoid ICE Fixes #78262

view details

push time in 3 hours

push eventjonas-schievink/rust

Yuki Okushi

commit sha 09135e4e758c6fb5a3ca91924a78521f749acda9

Add regression test for issue-77475

view details

Jonas Schievink

commit sha f94099af5841cab6f6015843c5c370c02ee5e725

Rollup merge of #78264 - JohnTitor:macro-test, r=petrochenkov Add regression test for issue-77475 Closes #77475

view details

push time in 3 hours

push eventjonas-schievink/rust

Camelid

commit sha 9775ac60dcc92dbb04861863a69eacfafeea5c4c

Document inline-const in the Unstable Book

view details

Jonas Schievink

commit sha db148ad430c62d4a78452c19fe178590bdaa289f

Rollup merge of #78250 - camelid:document-inline-const, r=spastorino Document inline-const Part of #76001. r? @spastorino

view details

push time in 3 hours

push eventjonas-schievink/rust

Bastian Kauschke

commit sha 40ab18d97dab9df68418d19ef8a40c3218142d5f

improve const infer error

view details

Bastian Kauschke

commit sha e1c524cd457bd02435a47214052320f8d4bfa999

review

view details

Jonas Schievink

commit sha 02af194355cac0b5ac3c5f2348ac1fc7bc881141

Rollup merge of #78249 - lcnr:ct-infer-origin, r=varkor improve const infer error For type inference we probably have to be careful about subtyping and stuff but considering that subtyping shouldn't be relevant for constants I don't really see a reason why we may not want to reuse the const origin here. r? `@varkor`

view details

push time in 3 hours

push eventjonas-schievink/rust

Nelson J Morais

commit sha c3cbaf64d3dbdd635153148a7f544a01fa209423

x.py test --test-args flag description enhancement

view details

Jonas Schievink

commit sha d3f33be3a52d2cc288cf54bde24be873ee2438d6

Rollup merge of #78243 - njasm:patch_test_args_description, r=jyn514 --test-args flag description tiny enhancement/clarification for the help description of the `--test-args` option from `x.py test` subcommand. Edit: ...as discussed in zulip [here](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/x.2Epy.20run.20single.20unit.20test.3F/near/214107842)

view details

push time in 3 hours

push eventjonas-schievink/rust

Tomasz Miąsko

commit sha a9470d0522368f67d8aaa551318e3feb2d18e790

Simplify assert terminator only if condition evaluates to expected value

view details

Jonas Schievink

commit sha 47ff2ffe8be9742bf0ded002506188bcc15eb8d1

Rollup merge of #78198 - tmiasko:assert, r=davidtwco Simplify assert terminator only if condition evaluates to expected value

view details

push time in 3 hours

push eventjonas-schievink/rust

Josh Stone

commit sha b62b352f4779072c07c110a63fd83afa9508b9e9

Check for exhaustion in RangeInclusive::contains When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false.

view details

Josh Stone

commit sha 9fd79a39044be777a39604856d0a276484d6480f

make exhausted RangeInclusive::end_bound return Excluded(end)

view details

Josh Stone

commit sha 9202fbdbdbd60adb62839c3230738274e30f15fc

Check for exhaustion in SliceIndex for RangeInclusive

view details

Jonas Schievink

commit sha d2a6f8e48f277cb291ec22e278213aea66381f1f

Rollup merge of #78109 - cuviper:exhausted-rangeinc, r=dtolnay Check for exhaustion in RangeInclusive::contains and slicing When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false. Fixes #77941.

view details

push time in 3 hours

push eventjonas-schievink/rust

Francesca Lovebloom

commit sha 16e10bf81ee73f61cf813acef3d5dbbce4f66da2

Revert "Allow dynamic linking for iOS/tvOS targets." This reverts commit 56e115a2627ba8bdd2e66c759457af96b2b0286a.

view details

Jonas Schievink

commit sha b168abe5b6c332a0bce1d5693add99e70180ebc2

Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jonas-schievink Revert "Allow dynamic linking for iOS/tvOS targets." This reverts PR #73516. On macOS I compile static libs for iOS, automated using [cargo-mobile](https://github.com/BrainiumLLC/cargo-mobile), which has worked smoothly for the past 2 years. However, upon updating to Rust 1.46.0, I was no longer able to use Rust on iOS. I've bisected this to the PR referenced above. For most projects tested, apps now immediately crash with a message like this: ``` dyld: Library not loaded: /Users/francesca/Projects/example/target/aarch64-apple-ios/debug/deps/libexample.dylib Referenced from: /private/var/containers/Bundle/Application/745912AF-A928-465C-B340-872BD1C9F368/example.app/example Reason: image not found dyld: launch, loading dependent libraries DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib ``` This can be reproduced by using cargo-mobile to generate a winit example project, and then attempting to run it on an iOS device (`cargo mobile init && cargo apple open`). In our projects that depend on DisplayLink, the build instead fails with a linker error: ``` = note: Undefined symbols for architecture arm64: "_CACurrentMediaTime", referenced from: display_link::ios::run_callback_ios10::hda81197ff46aedbd in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o) display_link::ios::run_callback_pre_ios10::h91f085da19374320 in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o) ld: symbol(s) not found for architecture arm64 ``` After reverting the change to enable dynamic linking on iOS, everything works the same as it did on Rust 1.45.2 for me. In the future, would it be possible for me to be pinged when iOS-related PRs are made? I work for a company that intends on using Rust on iOS in production, so I'd gladly provide testing. cc @aspenluxxxy

view details

push time in 3 hours

push eventjonas-schievink/rust

Canop

commit sha 9b90e1762e6cb21baa504a27530b9aa404fbe3ac

add `insert` and `insert_with` to `Option` This removes a cause of `unwrap` and code complexity. This allows replacing ``` option_value = Some(build()); option_value.as_mut().unwrap() ``` with ``` option_value.insert(build()) ``` or ``` option_value.insert_with(build) ``` It's also useful in contexts not requiring the mutability of the reference. Here's a typical cache example: ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => { cache = Some(compute_cache_entry()); // unwrap is OK because we just filled the option &cache.as_ref().unwrap().content } }; ``` It can be changed into ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => &cache.insert_with(compute_cache_entry).content, }; ```

view details

Canop

commit sha e8df2a426959fa3ff4f65eae85e618394bf27e28

remove `option.insert_with` `option.insert` covers both needs anyway, `insert_with` is redundant.

view details

Canop

commit sha 60a96cae336b621be3a5e01cf6c87649b327f836

more tests in option.insert, code cleaning in option Code cleaning made according to suggestions in discussion on PR ##77392 impacts insert, get_or_insert and get_or_insert_with.

view details

Canop

commit sha cc8b77a7cf0e1179b148a70c8f760a7ba3c1debd

fix naming unconsistency between function doc and prototype

view details

Canop

commit sha 39557799c763d75b58cbd7235af49a29c4d1212c

Update library/core/src/option.rs Co-authored-by: Mara Bos <m-ou.se@m-ou.se>

view details

Canop

commit sha 415a8e526d0e99f0e85e3b06bad9d2f2867910c5

Update library/core/src/option.rs Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Canop

commit sha 216d0fe36466ce9307a643a67afa41ebfb8c43dd

add tracking issue number to option_insert feature gate

view details

Jonas Schievink

commit sha 2918e14c012fdf9378aa4088a82dacfb77567a9d

Rollup merge of #77392 - Canop:option_insert, r=m-ou-se add `insert` to `Option` This removes a cause of `unwrap` and code complexity. This allows replacing ``` option_value = Some(build()); option_value.as_mut().unwrap() ``` with ``` option_value.insert(build()) ``` It's also useful in contexts not requiring the mutability of the reference. Here's a typical cache example: ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => { cache = Some(compute_cache_entry()); // unwrap is OK because we just filled the option &cache.as_ref().unwrap().content } }; ``` It can be changed into ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => &cache.insert(compute_cache_entry()).content, }; ``` *(edited: I removed `insert_with`)*

view details

push time in 3 hours

push eventjonas-schievink/rust

Nicolas Nattis

commit sha 929f80ece9d8875ef38dc45b4cfe372f263bc7c2

Add a spin loop hint for Arc::downgrade

view details

Jonas Schievink

commit sha 589537fd9e866c97a11f4e399da712d4db36d94d

Rollup merge of #76649 - nicbn:arc-spin-loop-hint, r=m-ou-se Add a spin loop hint for Arc::downgrade Adds `hint::spin_loop()` to the case where `Arc::downgrade` spins.

view details

push time in 3 hours

create barnchjonas-schievink/rust

branch : rollup-epcww30

created branch time in 3 hours

PR opened rust-lang/rust

Fix Ubuntu download URL
+1 -1

0 comment

1 changed file

pr created time in 3 hours

create barnchjonas-schievink/rust

branch : fix-ci

created branch time in 3 hours

pull request commentrust-lang/rust

Rollup of 15 pull requests

@m-ou-se it was moved to http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.6-base-armhf.tar.gz

jonas-schievink

comment created time in 3 hours

issue commentrust-lang/rust

Excessive memory usage building GTK Rust, a problem for entry level devices for newcomers (e.g. Raspberry PI 3+)

Since you have 4 cores but only 2 GB of RAM, try building with only 1 codegen unit.

ell1e

comment created time in 3 hours

pull request commentrust-lang/rust

Rollup of 15 pull requests

@bors retry

jonas-schievink

comment created time in 5 hours

pull request commentrust-lang/rust

Rollup of 15 pull requests

@bors r+ rollup=never p=15

@rustbot modify labels: rollup

jonas-schievink

comment created time in 5 hours

PR opened rust-lang/rust

Rollup of 15 pull requests

Successful merges:

  • #75115 (#[deny(unsafe_op_in_unsafe_fn)] in sys/cloudabi)
  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #77830 (Simplify query proc-macros)
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78249 (improve const infer error)
  • #78250 (Document inline-const)
  • #78264 (Add regression test for issue-77475)
  • #78268 (Do not try to report on closures to avoid ICE)
  • #78274 (Update description of Empty Enum for accuracy)
  • #78278 (move visit_predicate into TypeVisitor)
  • #78293 (Always store Rustdoc theme when it's changed)

Failed merges:

r? @ghost

+592 -415

0 comment

38 changed files

pr created time in 5 hours

push eventjonas-schievink/rust

nasso

commit sha a0ce1e095e0d89d35ff3de20541dd4faf79607da

Always store Rustdoc theme when it's changed

view details

Jonas Schievink

commit sha 9a132f554f25284ff2def5acf703e0ad621a0d18

Rollup merge of #78293 - nasso:master, r=GuillaumeGomez Always store Rustdoc theme when it's changed `switchTheme` (too) lazily updated the value of `rustdoc-theme` in `localStorage`, leading to an incorrect stored value when the system theme is the same as the default (`light`) theme. Fixes #78273

view details

push time in 5 hours

push eventjonas-schievink/rust

Bastian Kauschke

commit sha 972d9e886ca8787b2b4223bd39a76ff0250dfcaf

move `visit_predicate` into `TypeVisitor`

view details

Jonas Schievink

commit sha 49dc5ecfa91ae6d327e3aea90157ec560ff8e3b8

Rollup merge of #78278 - lcnr:predicate-visit, r=matthewjasper move `visit_predicate` into `TypeVisitor` Seems easier than dealing with `PredicateVisitor` for me which I needed for object safety checks for `PredicateAtom::ConstEvaluatable`. Is there a reason I am missing for this split? r? @matthewjasper

view details

push time in 5 hours

push eventjonas-schievink/rust

Eduardo Pinho

commit sha efedcb23447a805fad841c4e38d5dea0d53ec3c7

Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

Jonas Schievink

commit sha 411bef6ac22f9318da4d9b4ea6499bd27e5c1740

Rollup merge of #78274 - Enet4:patch-1, r=jonas-schievink Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

push time in 5 hours

push eventjonas-schievink/rust

Yuki Okushi

commit sha 50e34d6d658c4906a3292385b1962a3c26ce24c4

Do not try to report on closures to avoid ICE

view details

Jonas Schievink

commit sha 09d589e9ca8b8b1f33617448600936f9149941eb

Rollup merge of #78268 - JohnTitor:issue-78262, r=estebank Do not try to report on closures to avoid ICE Fixes #78262

view details

push time in 5 hours

push eventjonas-schievink/rust

Yuki Okushi

commit sha 09135e4e758c6fb5a3ca91924a78521f749acda9

Add regression test for issue-77475

view details

Jonas Schievink

commit sha ba91d8ed1ccb663ac3775e4fe23beaf1a54739e8

Rollup merge of #78264 - JohnTitor:macro-test, r=petrochenkov Add regression test for issue-77475 Closes #77475

view details

push time in 5 hours

push eventjonas-schievink/rust

Camelid

commit sha 9775ac60dcc92dbb04861863a69eacfafeea5c4c

Document inline-const in the Unstable Book

view details

Jonas Schievink

commit sha 58855f9fc0011e3f9e6eb9dd01a779d3101c5192

Rollup merge of #78250 - camelid:document-inline-const, r=spastorino Document inline-const Part of #76001. r? @spastorino

view details

push time in 5 hours

push eventjonas-schievink/rust

Bastian Kauschke

commit sha 40ab18d97dab9df68418d19ef8a40c3218142d5f

improve const infer error

view details

Bastian Kauschke

commit sha e1c524cd457bd02435a47214052320f8d4bfa999

review

view details

Jonas Schievink

commit sha 0ec32ef60fe976335f3c41dfe4ae755af7be775c

Rollup merge of #78249 - lcnr:ct-infer-origin, r=varkor improve const infer error For type inference we probably have to be careful about subtyping and stuff but considering that subtyping shouldn't be relevant for constants I don't really see a reason why we may not want to reuse the const origin here. r? `@varkor`

view details

push time in 5 hours

push eventjonas-schievink/rust

Tomasz Miąsko

commit sha a9470d0522368f67d8aaa551318e3feb2d18e790

Simplify assert terminator only if condition evaluates to expected value

view details

Jonas Schievink

commit sha 79afa041708b6494ae3c057659fd538030f4e9af

Rollup merge of #78198 - tmiasko:assert, r=davidtwco Simplify assert terminator only if condition evaluates to expected value

view details

push time in 5 hours

push eventjonas-schievink/rust

Josh Stone

commit sha b62b352f4779072c07c110a63fd83afa9508b9e9

Check for exhaustion in RangeInclusive::contains When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false.

view details

Josh Stone

commit sha 9fd79a39044be777a39604856d0a276484d6480f

make exhausted RangeInclusive::end_bound return Excluded(end)

view details

Josh Stone

commit sha 9202fbdbdbd60adb62839c3230738274e30f15fc

Check for exhaustion in SliceIndex for RangeInclusive

view details

Jonas Schievink

commit sha e8dbd9d7b75840b9f8e51f34b2e5160c6a8383d8

Rollup merge of #78109 - cuviper:exhausted-rangeinc, r=dtolnay Check for exhaustion in RangeInclusive::contains and slicing When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false. Fixes #77941.

view details

push time in 5 hours

push eventjonas-schievink/rust

Camille GILLOT

commit sha 0a4d948b4a8c69de0e3fdb231fdb14097849f6ce

Remove unused ProfileCategory.

view details

Camille GILLOT

commit sha de763701e19945866b540c8c0b105b78d83917ce

Remove unused category from macros.

view details

Camille GILLOT

commit sha de7da7fd3db58e5f58f82635c794bb8bdf9b269f

Unify query name and node name.

view details

Camille GILLOT

commit sha e853cc0b2886cf01942df71f524025af1c94f812

Retire rustc_dep_node_force.

view details

Camille GILLOT

commit sha 57ba8edb9eb7a805f63ab425fb5b1b7baa2e9fb3

Retire rustc_dep_node_try_load_from_on_disk_cache.

view details

Jonas Schievink

commit sha 0647b991ec7739622712897493e7f94e26041200

Rollup merge of #77830 - cjgillot:remacro, r=oli-obk Simplify query proc-macros The query code generation is split between proc-macros and regular macros in `rustc_middle::ty::query`. This PR removes unused capabilities of the proc-macros, and tend to use regular macros for the logic.

view details

push time in 5 hours

push eventjonas-schievink/rust

Francesca Lovebloom

commit sha 16e10bf81ee73f61cf813acef3d5dbbce4f66da2

Revert "Allow dynamic linking for iOS/tvOS targets." This reverts commit 56e115a2627ba8bdd2e66c759457af96b2b0286a.

view details

Jonas Schievink

commit sha b92f3c86305aba935c359af6f03807f48b6d01ea

Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jonas-schievink Revert "Allow dynamic linking for iOS/tvOS targets." This reverts PR #73516. On macOS I compile static libs for iOS, automated using [cargo-mobile](https://github.com/BrainiumLLC/cargo-mobile), which has worked smoothly for the past 2 years. However, upon updating to Rust 1.46.0, I was no longer able to use Rust on iOS. I've bisected this to the PR referenced above. For most projects tested, apps now immediately crash with a message like this: ``` dyld: Library not loaded: /Users/francesca/Projects/example/target/aarch64-apple-ios/debug/deps/libexample.dylib Referenced from: /private/var/containers/Bundle/Application/745912AF-A928-465C-B340-872BD1C9F368/example.app/example Reason: image not found dyld: launch, loading dependent libraries DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib ``` This can be reproduced by using cargo-mobile to generate a winit example project, and then attempting to run it on an iOS device (`cargo mobile init && cargo apple open`). In our projects that depend on DisplayLink, the build instead fails with a linker error: ``` = note: Undefined symbols for architecture arm64: "_CACurrentMediaTime", referenced from: display_link::ios::run_callback_ios10::hda81197ff46aedbd in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o) display_link::ios::run_callback_pre_ios10::h91f085da19374320 in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o) ld: symbol(s) not found for architecture arm64 ``` After reverting the change to enable dynamic linking on iOS, everything works the same as it did on Rust 1.45.2 for me. In the future, would it be possible for me to be pinged when iOS-related PRs are made? I work for a company that intends on using Rust on iOS in production, so I'd gladly provide testing. cc @aspenluxxxy

view details

push time in 5 hours

push eventjonas-schievink/rust

Stefan Lankes

commit sha 16d65d04322de4a00327dfe26b4af6bd3e4187c8

revise Hermit's mutex interface to support the behaviour of StaticMutex rust-lang/rust#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the behavior of StaticMutex, we move part of the mutex implementation into libstd.

view details

Stefan Lankes

commit sha 98fcc3fbc7b2f3420d393b8916746002d501401c

using the latest version of libhermit-rs

view details

Stefan Lankes

commit sha d560b50d87c05ea5a8e6186c05a50ecd828eaaae

revise code to pass the format check

view details

Stefan Lankes

commit sha 986c1fc053828a051c9fd888cbf49393f276f4f5

revise comments and descriptions of the helper functions

view details

Stefan Lankes

commit sha d6e955f3bfd0a47240879549dc2fb3284dfe08e4

fix typos in new method

view details

Stefan Lankes

commit sha 530f5754664699dee29bde6cfa99aaf861499544

revise code to pass the format check

view details

Stefan Lankes

commit sha 8d8a290c691db7a8ee566edbd485a729eb41d4ba

add hermit to the list of omit OS

view details

Stefan Lankes

commit sha 33fd08b61f57cde81bf01964b2fc4d2dca0e4d3f

remove obsolete function diverge

view details

Stefan Lankes

commit sha 30c3dadb4da44c950f79e9772b36bbaf2660bb0e

reuse implementation of the system provider "unsupported"

view details

Stefan Lankes

commit sha 1741e5b8f581960a6e9cb9f0b8261b5f0c26e92d

define required type 'MovableMutex'

view details

Stefan Lankes

commit sha bc6b2ac449a0f6d9a8bd87788a0eae9516cb58ce

move __rg_oom to the libos to avoid duplicated symbols

view details

Stefan Lankes

commit sha 77d98316f489f4490459b3dcf12d14f45caf1286

minor changes to pass the format check

view details

Stefan Lankes

commit sha bf268fe928eae8d85a868ccdbcc086ea033ae51c

box mutex to get a movable mutex the commit avoid an alignement issue in Mutex implementation

view details

Jonas Schievink

commit sha b0c018d75e7149ae71883e9c53a127644b9e6b2e

Rollup merge of #77610 - hermitcore:dtors, r=m-ou-se revise Hermit's mutex interface to support the behaviour of StaticMutex rust-lang/rust#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the new behavior of StaticMutex, we move part of the mutex implementation into libstd. The interface to the OS changed. Consequently, I removed a few functions, which aren't longer needed.

view details

push time in 5 hours

push eventjonas-schievink/rust

Canop

commit sha 9b90e1762e6cb21baa504a27530b9aa404fbe3ac

add `insert` and `insert_with` to `Option` This removes a cause of `unwrap` and code complexity. This allows replacing ``` option_value = Some(build()); option_value.as_mut().unwrap() ``` with ``` option_value.insert(build()) ``` or ``` option_value.insert_with(build) ``` It's also useful in contexts not requiring the mutability of the reference. Here's a typical cache example: ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => { cache = Some(compute_cache_entry()); // unwrap is OK because we just filled the option &cache.as_ref().unwrap().content } }; ``` It can be changed into ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => &cache.insert_with(compute_cache_entry).content, }; ```

view details

Canop

commit sha e8df2a426959fa3ff4f65eae85e618394bf27e28

remove `option.insert_with` `option.insert` covers both needs anyway, `insert_with` is redundant.

view details

Canop

commit sha 60a96cae336b621be3a5e01cf6c87649b327f836

more tests in option.insert, code cleaning in option Code cleaning made according to suggestions in discussion on PR ##77392 impacts insert, get_or_insert and get_or_insert_with.

view details

Canop

commit sha cc8b77a7cf0e1179b148a70c8f760a7ba3c1debd

fix naming unconsistency between function doc and prototype

view details

Canop

commit sha 39557799c763d75b58cbd7235af49a29c4d1212c

Update library/core/src/option.rs Co-authored-by: Mara Bos <m-ou.se@m-ou.se>

view details

Canop

commit sha 415a8e526d0e99f0e85e3b06bad9d2f2867910c5

Update library/core/src/option.rs Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Canop

commit sha 216d0fe36466ce9307a643a67afa41ebfb8c43dd

add tracking issue number to option_insert feature gate

view details

Jonas Schievink

commit sha 39b3f6b12f8879607b8012f5c0e28972cb44b314

Rollup merge of #77392 - Canop:option_insert, r=m-ou-se add `insert` to `Option` This removes a cause of `unwrap` and code complexity. This allows replacing ``` option_value = Some(build()); option_value.as_mut().unwrap() ``` with ``` option_value.insert(build()) ``` It's also useful in contexts not requiring the mutability of the reference. Here's a typical cache example: ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => { cache = Some(compute_cache_entry()); // unwrap is OK because we just filled the option &cache.as_ref().unwrap().content } }; ``` It can be changed into ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => &cache.insert(compute_cache_entry()).content, }; ``` *(edited: I removed `insert_with`)*

view details

push time in 5 hours

push eventjonas-schievink/rust

Nicolas Nattis

commit sha 929f80ece9d8875ef38dc45b4cfe372f263bc7c2

Add a spin loop hint for Arc::downgrade

view details

Jonas Schievink

commit sha 52c9f0fc1b5c183facc0f112f3a18e5945fff23c

Rollup merge of #76649 - nicbn:arc-spin-loop-hint, r=m-ou-se Add a spin loop hint for Arc::downgrade Adds `hint::spin_loop()` to the case where `Arc::downgrade` spins.

view details

push time in 5 hours

push eventjonas-schievink/rust

chansuke

commit sha d3467fe520d17f26f3781286e6b6caab4700928e

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

view details

Jonas Schievink

commit sha eccd04c7fb870f83df09b077c52ba107f94bdfb9

Rollup merge of #75115 - chansuke:sys-cloudabi-unsafe, r=KodrAus `#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi Partial fix of #73904. This encloses unsafe operations in unsafe fn in sys/cloudabi.

view details

push time in 5 hours

create barnchjonas-schievink/rust

branch : rollup-d4emvwm

created branch time in 5 hours

delete branch jonas-schievink/rust

delete branch : rollup-u9bhmx9

delete time in 5 hours

PR closed rust-lang/rust

Rollup of 12 pull requests S-waiting-on-bors rollup

Successful merges:

  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78249 (improve const infer error)
  • #78250 (Document inline-const)
  • #78264 (Add regression test for issue-77475)
  • #78274 (Update description of Empty Enum for accuracy)
  • #78278 (move visit_predicate into TypeVisitor)
  • #78293 (Always store Rustdoc theme when it's changed)

Failed merges:

r? @ghost

+410 -238

2 comments

26 changed files

jonas-schievink

pr closed time in 5 hours

create barnchjonas-schievink/rftdi

branch : read-uart

created branch time in 6 hours

pull request commentrust-lang/rust

Rollup of 12 pull requests

@bors r+ rollup=never p=12

@rustbot modify labels: rollup

jonas-schievink

comment created time in 7 hours

PR opened rust-lang/rust

Rollup of 12 pull requests

Successful merges:

  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78249 (improve const infer error)
  • #78250 (Document inline-const)
  • #78264 (Add regression test for issue-77475)
  • #78274 (Update description of Empty Enum for accuracy)
  • #78278 (move visit_predicate into TypeVisitor)
  • #78293 (Always store Rustdoc theme when it's changed)

Failed merges:

r? @ghost

+410 -238

0 comment

26 changed files

pr created time in 7 hours

push eventjonas-schievink/rust

nasso

commit sha a0ce1e095e0d89d35ff3de20541dd4faf79607da

Always store Rustdoc theme when it's changed

view details

Jonas Schievink

commit sha 65ac6699628da5a356dc5e7d9a398c992fe38f2b

Rollup merge of #78293 - nasso:master, r=GuillaumeGomez Always store Rustdoc theme when it's changed `switchTheme` (too) lazily updated the value of `rustdoc-theme` in `localStorage`, leading to an incorrect stored value when the system theme is the same as the default (`light`) theme. Fixes #78273

view details

push time in 7 hours

push eventjonas-schievink/rust

Bastian Kauschke

commit sha 972d9e886ca8787b2b4223bd39a76ff0250dfcaf

move `visit_predicate` into `TypeVisitor`

view details

Jonas Schievink

commit sha e59100d8ee524721d7e8befbd5eaa3a889818953

Rollup merge of #78278 - lcnr:predicate-visit, r=matthewjasper move `visit_predicate` into `TypeVisitor` Seems easier than dealing with `PredicateVisitor` for me which I needed for object safety checks for `PredicateAtom::ConstEvaluatable`. Is there a reason I am missing for this split? r? @matthewjasper

view details

push time in 7 hours

push eventjonas-schievink/rust

Eduardo Pinho

commit sha efedcb23447a805fad841c4e38d5dea0d53ec3c7

Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

Jonas Schievink

commit sha 6cdad4bb4e5d321fb3dbb43db929d7016e8c1d83

Rollup merge of #78274 - Enet4:patch-1, r=jonas-schievink Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

push time in 7 hours

push eventjonas-schievink/rust

Yuki Okushi

commit sha 09135e4e758c6fb5a3ca91924a78521f749acda9

Add regression test for issue-77475

view details

Jonas Schievink

commit sha 1c5289ce8a351531f9e1cb3fcacd052fcfba010b

Rollup merge of #78264 - JohnTitor:macro-test, r=petrochenkov Add regression test for issue-77475 Closes #77475

view details

push time in 7 hours

push eventjonas-schievink/rust

Camelid

commit sha 9775ac60dcc92dbb04861863a69eacfafeea5c4c

Document inline-const in the Unstable Book

view details

Jonas Schievink

commit sha 7afe1e0a67c6ec2e37883163b11a5a1d25066e47

Rollup merge of #78250 - camelid:document-inline-const, r=spastorino Document inline-const Part of #76001. r? @spastorino

view details

push time in 7 hours

push eventjonas-schievink/rust

Bastian Kauschke

commit sha 40ab18d97dab9df68418d19ef8a40c3218142d5f

improve const infer error

view details

Bastian Kauschke

commit sha e1c524cd457bd02435a47214052320f8d4bfa999

review

view details

Jonas Schievink

commit sha 09008bf66f02b6c826a010aaa1265499d203db82

Rollup merge of #78249 - lcnr:ct-infer-origin, r=varkor improve const infer error For type inference we probably have to be careful about subtyping and stuff but considering that subtyping shouldn't be relevant for constants I don't really see a reason why we may not want to reuse the const origin here. r? `@varkor`

view details

push time in 7 hours

push eventjonas-schievink/rust

Tomasz Miąsko

commit sha a9470d0522368f67d8aaa551318e3feb2d18e790

Simplify assert terminator only if condition evaluates to expected value

view details

Jonas Schievink

commit sha 40afcdae94b142d26dde0cd1c0ebbdb311e4ecbf

Rollup merge of #78198 - tmiasko:assert, r=davidtwco Simplify assert terminator only if condition evaluates to expected value

view details

push time in 7 hours

push eventjonas-schievink/rust

Josh Stone

commit sha b62b352f4779072c07c110a63fd83afa9508b9e9

Check for exhaustion in RangeInclusive::contains When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false.

view details

Josh Stone

commit sha 9fd79a39044be777a39604856d0a276484d6480f

make exhausted RangeInclusive::end_bound return Excluded(end)

view details

Josh Stone

commit sha 9202fbdbdbd60adb62839c3230738274e30f15fc

Check for exhaustion in SliceIndex for RangeInclusive

view details

Jonas Schievink

commit sha 0f281dee7e6dbada7e24cc00d4ef5ca9a9431325

Rollup merge of #78109 - cuviper:exhausted-rangeinc, r=dtolnay Check for exhaustion in RangeInclusive::contains and slicing When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false. Fixes #77941.

view details

push time in 7 hours

push eventjonas-schievink/rust

Francesca Lovebloom

commit sha 16e10bf81ee73f61cf813acef3d5dbbce4f66da2

Revert "Allow dynamic linking for iOS/tvOS targets." This reverts commit 56e115a2627ba8bdd2e66c759457af96b2b0286a.

view details

Jonas Schievink

commit sha dc0a584e75d709fafe2510ba98c0c6623bbb2850

Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jonas-schievink Revert "Allow dynamic linking for iOS/tvOS targets." This reverts PR #73516. On macOS I compile static libs for iOS, automated using [cargo-mobile](https://github.com/BrainiumLLC/cargo-mobile), which has worked smoothly for the past 2 years. However, upon updating to Rust 1.46.0, I was no longer able to use Rust on iOS. I've bisected this to the PR referenced above. For most projects tested, apps now immediately crash with a message like this: ``` dyld: Library not loaded: /Users/francesca/Projects/example/target/aarch64-apple-ios/debug/deps/libexample.dylib Referenced from: /private/var/containers/Bundle/Application/745912AF-A928-465C-B340-872BD1C9F368/example.app/example Reason: image not found dyld: launch, loading dependent libraries DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib ``` This can be reproduced by using cargo-mobile to generate a winit example project, and then attempting to run it on an iOS device (`cargo mobile init && cargo apple open`). In our projects that depend on DisplayLink, the build instead fails with a linker error: ``` = note: Undefined symbols for architecture arm64: "_CACurrentMediaTime", referenced from: display_link::ios::run_callback_ios10::hda81197ff46aedbd in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o) display_link::ios::run_callback_pre_ios10::h91f085da19374320 in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o) ld: symbol(s) not found for architecture arm64 ``` After reverting the change to enable dynamic linking on iOS, everything works the same as it did on Rust 1.45.2 for me. In the future, would it be possible for me to be pinged when iOS-related PRs are made? I work for a company that intends on using Rust on iOS in production, so I'd gladly provide testing. cc `@aspenluxxxy`

view details

push time in 7 hours

push eventjonas-schievink/rust

Stefan Lankes

commit sha 16d65d04322de4a00327dfe26b4af6bd3e4187c8

revise Hermit's mutex interface to support the behaviour of StaticMutex rust-lang/rust#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the behavior of StaticMutex, we move part of the mutex implementation into libstd.

view details

Stefan Lankes

commit sha 98fcc3fbc7b2f3420d393b8916746002d501401c

using the latest version of libhermit-rs

view details

Stefan Lankes

commit sha d560b50d87c05ea5a8e6186c05a50ecd828eaaae

revise code to pass the format check

view details

Stefan Lankes

commit sha 986c1fc053828a051c9fd888cbf49393f276f4f5

revise comments and descriptions of the helper functions

view details

Stefan Lankes

commit sha d6e955f3bfd0a47240879549dc2fb3284dfe08e4

fix typos in new method

view details

Stefan Lankes

commit sha 530f5754664699dee29bde6cfa99aaf861499544

revise code to pass the format check

view details

Stefan Lankes

commit sha 8d8a290c691db7a8ee566edbd485a729eb41d4ba

add hermit to the list of omit OS

view details

Stefan Lankes

commit sha 33fd08b61f57cde81bf01964b2fc4d2dca0e4d3f

remove obsolete function diverge

view details

Stefan Lankes

commit sha 30c3dadb4da44c950f79e9772b36bbaf2660bb0e

reuse implementation of the system provider "unsupported"

view details

Stefan Lankes

commit sha 1741e5b8f581960a6e9cb9f0b8261b5f0c26e92d

define required type 'MovableMutex'

view details

Stefan Lankes

commit sha bc6b2ac449a0f6d9a8bd87788a0eae9516cb58ce

move __rg_oom to the libos to avoid duplicated symbols

view details

Stefan Lankes

commit sha 77d98316f489f4490459b3dcf12d14f45caf1286

minor changes to pass the format check

view details

Stefan Lankes

commit sha bf268fe928eae8d85a868ccdbcc086ea033ae51c

box mutex to get a movable mutex the commit avoid an alignement issue in Mutex implementation

view details

Jonas Schievink

commit sha bd629434ab758ff4114ec7feb06539e9187ff83b

Rollup merge of #77610 - hermitcore:dtors, r=m-ou-se revise Hermit's mutex interface to support the behaviour of StaticMutex rust-lang/rust#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the new behavior of StaticMutex, we move part of the mutex implementation into libstd. The interface to the OS changed. Consequently, I removed a few functions, which aren't longer needed.

view details

push time in 7 hours

push eventjonas-schievink/rust

Canop

commit sha 9b90e1762e6cb21baa504a27530b9aa404fbe3ac

add `insert` and `insert_with` to `Option` This removes a cause of `unwrap` and code complexity. This allows replacing ``` option_value = Some(build()); option_value.as_mut().unwrap() ``` with ``` option_value.insert(build()) ``` or ``` option_value.insert_with(build) ``` It's also useful in contexts not requiring the mutability of the reference. Here's a typical cache example: ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => { cache = Some(compute_cache_entry()); // unwrap is OK because we just filled the option &cache.as_ref().unwrap().content } }; ``` It can be changed into ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => &cache.insert_with(compute_cache_entry).content, }; ```

view details

Canop

commit sha e8df2a426959fa3ff4f65eae85e618394bf27e28

remove `option.insert_with` `option.insert` covers both needs anyway, `insert_with` is redundant.

view details

Canop

commit sha 60a96cae336b621be3a5e01cf6c87649b327f836

more tests in option.insert, code cleaning in option Code cleaning made according to suggestions in discussion on PR ##77392 impacts insert, get_or_insert and get_or_insert_with.

view details

Canop

commit sha cc8b77a7cf0e1179b148a70c8f760a7ba3c1debd

fix naming unconsistency between function doc and prototype

view details

Canop

commit sha 39557799c763d75b58cbd7235af49a29c4d1212c

Update library/core/src/option.rs Co-authored-by: Mara Bos <m-ou.se@m-ou.se>

view details

Canop

commit sha 415a8e526d0e99f0e85e3b06bad9d2f2867910c5

Update library/core/src/option.rs Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Canop

commit sha 216d0fe36466ce9307a643a67afa41ebfb8c43dd

add tracking issue number to option_insert feature gate

view details

Jonas Schievink

commit sha f4649b95bb0f8bcec7bd25205b758f27ae0dd53b

Rollup merge of #77392 - Canop:option_insert, r=m-ou-se add `insert` to `Option` This removes a cause of `unwrap` and code complexity. This allows replacing ``` option_value = Some(build()); option_value.as_mut().unwrap() ``` with ``` option_value.insert(build()) ``` It's also useful in contexts not requiring the mutability of the reference. Here's a typical cache example: ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => { cache = Some(compute_cache_entry()); // unwrap is OK because we just filled the option &cache.as_ref().unwrap().content } }; ``` It can be changed into ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => &cache.insert(compute_cache_entry()).content, }; ``` *(edited: I removed `insert_with`)*

view details

push time in 7 hours

push eventjonas-schievink/rust

Nicolas Nattis

commit sha a838a708e3239af7f9cbf0a79be10d495759e63c

Add a spin loop hint for Arc::downgrade

view details

Nicolas Nattis

commit sha f3db47769bdf79dbcf78a1711b82d3da6616ffde

Merge branch 'master' of https://github.com/rust-lang/rust into arc-spin-loop-hint

view details

Nicolas Nattis

commit sha b58db1b7a122f4b45eec51cc72d5b1708cdb7a4f

Formatting

view details

Jonas Schievink

commit sha 3bdf2cfc624fef105b8c4490c8cbca48bb682b52

Rollup merge of #76649 - nicbn:arc-spin-loop-hint, r=m-ou-se Add a spin loop hint for Arc::downgrade Adds `hint::spin_loop()` to the case where `Arc::downgrade` spins.

view details

push time in 7 hours

create barnchjonas-schievink/rust

branch : rollup-u9bhmx9

created branch time in 7 hours

delete branch jonas-schievink/rust

delete branch : rollup-vq06p6e

delete time in 7 hours

PR closed rust-lang/rust

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

Successful merges:

  • #75115 (#[deny(unsafe_op_in_unsafe_fn)] in sys/cloudabi)
  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #78026 (Define fs::hard_link to not follow symlinks.)
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78249 (improve const infer error)
  • #78264 (Add regression test for issue-77475)
  • #78274 (Update description of Empty Enum for accuracy)

Failed merges:

r? @ghost

+500 -284

4 comments

28 changed files

jonas-schievink

pr closed time in 7 hours

pull request commentrust-lang/rust

Define `fs::hard_link` to not follow symlinks.

@bors r- rollup=iffy failed in https://github.com/rust-lang/rust/pull/78282#issuecomment-715476217

sunfishcode

comment created time in 7 hours

push eventjonas-schievink/rust-analyzer

Jonas Schievink

commit sha 5350c15e27bfb85d2e7ae3eae0e624197f2b9a70

Fix name of InactiveCode diagnostic

view details

push time in 7 hours

PR opened rust-analyzer/rust-analyzer

Diagnose #[cfg]s in bodies

This PR threads diagnostics through body lowering using the BodySourceMap, and emits InactiveCode diagnostics for expressions, statements, and match arms that are #[cfg]d out.

+218 -98

0 comment

9 changed files

pr created time in 7 hours

create barnchjonas-schievink/rust-analyzer

branch : cfg-body

created branch time in 7 hours

issue commentrust-lang/rust

catch_unwind not working with opt-level > 1

Closing as not-a-bug

snx90

comment created time in 8 hours

issue closedrust-lang/rust

catch_unwind not working with opt-level > 1

In Windows (Rust nightly version), running the following code in release mode (default options):

extern crate libc;

use std::panic;
use libc::*;

#[cfg(all(windows, target_arch = "x86_64"))]
unsafe fn segfault_handler(_signum: c_int) {
    panic!("I got you");
}

#[cfg(all(windows, target_arch = "x86_64"))]
fn main() {
    let f = segfault_handler as *const fn(c_int);
    unsafe { signal(SIGSEGV, f as size_t); }

    let mut pointer: *mut u64 = std::ptr::null_mut();
    unsafe{
        let result = panic::catch_unwind(|| {
            core::ptr::write_volatile(pointer, 1);
        });
        assert!(result.is_err());
    }

    print!("hello again!\n");
}

results in the following (unexpected) behavior:

thread 'main' panicked at 'I got you', src\main.rs:8:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `C:\Users\test\temp\panics\target\release\panics.exe` (exit code: 101)

However, running the same example in development mode (default options) does produce the expected output (i.e., the signal is handled and the process successfully exits):

thread 'main' panicked at 'I got you', src\main.rs:8:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
hello again!

I have noticed that this issue happens whenever the opt-level > 1.

closed time in 8 hours

snx90

push eventknurling-rs/probe-run

Jorge Aparicio

commit sha 2c4010e17e03ac63fbd9d4a4122da81512005de3

update defmt git dep

view details

Jonas Schievink

commit sha 92a60cfa18f70bb7d5a86e283281e438c002d494

Merge pull request #84 from knurling-rs/defmt-up update defmt git dep

view details

push time in 9 hours

PR merged knurling-rs/probe-run

Reviewers
update defmt git dep
+2 -2

0 comment

1 changed file

japaric

pr closed time in 9 hours

issue commentrust-lang/rust

catch_unwind not working with opt-level > 1

Pretty sure unwinding out of a signal handler is UB

snx90

comment created time in 9 hours

PullRequestReviewEvent

Pull request review commentknurling-rs/defmt

don't try to parse `_defmt_version_` as JSON

 pub fn parse(elf: &[u8]) -> Result<Option<Table>, anyhow::Error> {             _ => continue,         }; +        if is_defmt_version(name) {+            // not a defmt symbol

Can you copy (part of) the PR description here to explain why this is necessary?

japaric

comment created time in 10 hours

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentknurling-rs/probe-run

add git info to --version output

+use core::str;+use std::{env, error::Error, fs, path::PathBuf, process::Command};
use std::{env, error::Error, fs, path::PathBuf, process::Command, str};
japaric

comment created time in 11 hours

PullRequestReviewEvent
PullRequestReviewEvent

issue commentrust-lang/rust

Shell script error in installation documentation

We want to enforce HTTPS usage here

richardgong1987

comment created time in 11 hours

issue commentrust-lang/rust

Shell script error in installation documentation

According to the man page this is correct:

       --proto <protocols>
              Tells curl to limit what protocols it may use in the  transfer.  Protocols  are
              evaluated  left  to right, are comma separated, and are each a protocol name or
              'all', optionally prefixed by zero or more modifiers. Available modifiers are:

              +  Permit this protocol in addition to protocols already permitted (this is the
                 default if no modifier is used).

              -  Deny  this  protocol, removing it from the list of protocols already permit‐
                 ted.

              =  Permit only this protocol (ignoring the list already permitted), though sub‐
                 ject  to  later  modification  by  subsequent entries in the comma separated
                 list.
richardgong1987

comment created time in 11 hours

issue commentrust-lang/rust

Move `StorageDead`/`StorageLive` around to allow more optimizations to trigger

cc https://github.com/rust-lang/rust/issues/68622

oli-obk

comment created time in 11 hours

PullRequestReviewEvent

Pull request review commentknurling-rs/defmt

update docs

 info!("xs={:[?]}", xs);  Note that for slices of bytes `{:[u8]}` should be preferred as it's better compressed. `[T] where T: Format` also implements the `Format` trait so it's possible to format `[T]` with `{:?}` but `{:[?]}` uses slightly less bandwidth.++If you have an array of types that implement the `Format` trait, instead of a slice. You should use+the `{:[?; N]}` parameter (where `N` is a number); this saves bandwidth compared to `{:[?]}`.++``` rust+# extern crate defmt;+# use defmt::{Format, info};+#[derive(Format)]+struct X {+    y: u16,+    z: u8,+}+let xs: [X; 2] = [/* .. */];

This is failing CI

japaric

comment created time in 11 hours

PullRequestReviewEvent

pull request commentrust-lang/rust

Rollup of 11 pull requests

@bors r+ rollup=never p=11

@rustbot modify labels: rollup

jonas-schievink

comment created time in 12 hours

PR opened rust-lang/rust

Rollup of 11 pull requests

Successful merges:

  • #75115 (#[deny(unsafe_op_in_unsafe_fn)] in sys/cloudabi)
  • #76649 (Add a spin loop hint for Arc::downgrade)
  • #77392 (add insert to Option)
  • #77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex)
  • #77716 (Revert "Allow dynamic linking for iOS/tvOS targets.")
  • #78026 (Define fs::hard_link to not follow symlinks.)
  • #78109 (Check for exhaustion in RangeInclusive::contains and slicing)
  • #78198 (Simplify assert terminator only if condition evaluates to expected value)
  • #78249 (improve const infer error)
  • #78264 (Add regression test for issue-77475)
  • #78274 (Update description of Empty Enum for accuracy)

Failed merges:

r? @ghost

+500 -284

0 comment

28 changed files

pr created time in 12 hours

push eventjonas-schievink/rust

Eduardo Pinho

commit sha efedcb23447a805fad841c4e38d5dea0d53ec3c7

Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

Jonas Schievink

commit sha 24bb519220bee9f31966fd0c69ccd82e3b0c1929

Rollup merge of #78274 - Enet4:patch-1, r=jonas-schievink Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.

view details

push time in 12 hours

more