lcnr
242633fe52
add comments and tests
2024-01-09 11:53:50 +01:00
lcnr
88271deac2
avoid always rerunning in case of a cycle
2024-01-09 11:19:34 +01:00
lcnr
118453c7e1
readd the provisional cache
2024-01-09 09:15:56 +01:00
lcnr
eb4d7c7adf
all to any
...
don't really know why, but it is a lot easier for me to think
about cycles that way.
2024-01-08 10:41:55 +01:00
lcnr
61d6b20cd8
do not track root depth of cycles
...
results in slightly cleaner logic while making the following commit easier
2024-01-08 10:37:21 +01:00
lcnr
41b624d40c
use doc comments
2024-01-08 10:19:15 +01:00
bors
0ee9cfd54d
Auto merge of #119693 - petrochenkov:cachemark, r=cjgillot
...
macro_rules: Add an expansion-local cache to span marker
Most tokens in a macro body typically have the same syntax context.
So the cache should usually be hit.
This change can either be combined with https://github.com/rust-lang/rust/pull/119689 , or serve as its alternative, depending on perf results.
2024-01-08 04:07:35 +00:00
Vadim Petrochenkov
edec91d624
macro_rules: Add an expansion-local cache to span marker
2024-01-08 03:06:37 +03:00
bors
76101eecbe
Auto merge of #119722 - matthiaskrgr:rollup-y6w3c9h, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- #116129 (Rewrite `pin` module documentation to clarify usage and invariants)
- #119703 (Impl trait diagnostic tweaks)
- #119705 (Support `~const` in associated functions in trait impls)
- #119708 (Unions are not `PointerLike`)
- #119711 (Delete unused makefile in tests/ui)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-01-08 00:04:01 +00:00
Matthias Krüger
bf20ade5bf
Rollup merge of #119711 - Nilstrieb:makewtf, r=WaffleLapkin
...
Delete unused makefile in tests/ui
??????????
2024-01-08 00:38:36 +01:00
Matthias Krüger
26768609fb
Rollup merge of #119708 - compiler-errors:pointer-like, r=Nilstrieb
...
Unions are not `PointerLike`
I introduced the `PointerLike` trait to enforce `dyn*` coercions only from types that share the same ABI as a pointer. On top of needing to be scalar, they also should not be unions, since CTFE chokes on scalar reads for union types.
Fixes #119695
2024-01-08 00:38:35 +01:00
Matthias Krüger
39b3ef17a1
Rollup merge of #119705 - fmease:tilde-const-assoc-fns-trait-impls, r=compiler-errors
...
Support `~const` in associated functions in trait impls
Fixes #119700 .
2024-01-08 00:38:35 +01:00
Matthias Krüger
0207e24406
Rollup merge of #119703 - compiler-errors:impl-trait-tweaks, r=fmease
...
Impl trait diagnostic tweaks
1. Tweak some names for `impl Trait` being used in the wrong position
2. Remove two helper functions that are no longer needed since RPITIT is stable, and which causes matches to be a bit obtuse.
3. Split and fix the part where the error notes that it's "only allowed in XX"
Fixes #119629
2024-01-08 00:38:34 +01:00
Matthias Krüger
a9b6908e7f
Rollup merge of #116129 - fu5ha:better-pin-docs-2, r=Amanieu
...
Rewrite `pin` module documentation to clarify usage and invariants
The documentation of `pin` today does not give a complete treatment of pinning from first principles, nor does it adequately help build intuition and understanding for how the different elements of the pinning story fit together.
This rewrite attempts to address these in a way that makes the concept more approachable while also making the documentation more normative.
This PR picks up where `@mcy` left off in #88500 (thanks to him for the original work and `@Manishearth` for mentioning it such that I originally found it). I've directly incorporated much of the feedback left on the original PR and have rewritten and changed some of the main conceits of the prose to better adhere to the feedback from the reviewers on that PR or just explain something in (hopefully) a better way.
2024-01-08 00:38:33 +01:00
Nilstrieb
5be2a85351
Delete unused makefile in tests/ui
...
??????????
2024-01-07 20:48:31 +01:00
Michael Goulet
68bb76634d
Unions are not PointerLike
2024-01-07 19:28:00 +00:00
Michael Goulet
7e38b70cc0
Split note, fix const/static impl trait error
2024-01-07 18:00:03 +00:00
León Orell Valerian Liehr
3acc5a0da3
effects: support ~const in assoc fns in trait impls
2024-01-07 18:22:47 +01:00
Manish Goregaokar
7fd841c098
link
2024-01-07 08:57:23 -08:00
Manish Goregaokar
df6d44961d
Update library/core/src/pin.rs
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-01-07 08:56:25 -08:00
Manish Goregaokar
b1830f130a
clean up structural pinning
2024-01-07 08:56:24 -08:00
Manish Goregaokar
a573c7c409
footnote on dropping futures
2024-01-07 08:56:24 -08:00
Manish Goregaokar
6a54ed71c0
valid
2024-01-07 08:56:24 -08:00
Manish Goregaokar
6553d0d551
punctuation in parens
2024-01-07 08:56:24 -08:00
Manish Goregaokar
68bdeddb5c
Apply suggestions from code review
...
Co-authored-by: Ralf Jung <post@ralfj.de>
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
2024-01-07 08:56:24 -08:00
Manish Goregaokar
4c25246f3e
Clean up guarantees wording
...
We don't need to go into that much depth at this stage
2024-01-07 08:56:24 -08:00
Manish Goregaokar
936ceb20f5
lifetime -> lifespan where relevant. improve docs on as_ref()
2024-01-07 08:56:24 -08:00
Manish Goregaokar
0050676440
Rephrase unpin docs in terms of pinning-agnosticness
2024-01-07 08:56:24 -08:00
Gray Olson
058fb50ecd
trim section on managed-box model
2024-01-07 08:56:23 -08:00
Gray Olson
9997114e14
improve Pin::new_unchecked docs
2024-01-07 08:56:23 -08:00
Gray Olson
d7a886a807
update ui tests
2024-01-07 08:56:20 -08:00
Gray Olson
f0827b3055
fix broken link
2024-01-07 08:56:10 -08:00
Gray Olson
e0210e6e1d
justify motivation of Unpin better
2024-01-07 08:56:09 -08:00
Gray Olson
469c78bcfd
improve Pin and Pin::new docs
2024-01-07 08:56:09 -08:00
Gray Olson
6e882790b8
Pin<P> -> Pin<Ptr>
2024-01-07 08:56:09 -08:00
Gray Olson
de2e748a40
fix typos and edit prose
2024-01-07 08:56:08 -08:00
Gray Olson
6d5f43d77d
edit new section for typos and better wording
2024-01-07 08:56:08 -08:00
Gray Olson
921d37dbd5
fix imports
2024-01-07 08:56:07 -08:00
Gray Olson
f2447a6a70
fix typos
2024-01-07 08:56:07 -08:00
Gray Olson
252a83b63f
add section on manual owning ptr managed solution via @kpreid
2024-01-07 08:56:07 -08:00
Gray Olson
7c9c71260e
improve structural Unpin + formatting
2024-01-07 08:56:06 -08:00
Gray Olson
e2e8746bb6
reword unpin auto impl section
2024-01-07 08:56:06 -08:00
Gray Olson
82a68171d3
fix link in footnote
2024-01-07 08:56:06 -08:00
Gray Olson
bebbe24a63
improve Pin struct docs and add examples
2024-01-07 08:56:05 -08:00
Gray Olson
6818d9278b
improve intro and discussion of pinning as library contract
2024-01-07 08:56:05 -08:00
Gray Olson
db5b19e472
improve intro and Unpin-related discussion
2024-01-07 08:56:05 -08:00
Gray Olson
46f9d77bd1
update doubly linked list commentary and fix links
2024-01-07 08:56:04 -08:00
Gray Olson
ec8a01a479
fix one more broken link
2024-01-07 08:56:04 -08:00
Gray Olson
584f0986fc
fix broken links
2024-01-07 08:56:04 -08:00
Gray Olson
ba3b9342cc
Fix examples, finish polishing
2024-01-07 08:56:04 -08:00