Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs to Box conversions #89199

Closed
wants to merge 960 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
960 commits
Select commit Hold shift + click to select a range
b06409e
Rename etc -> has_rest_pat
DevinR528 Oct 2, 2021
67ea84d
Add desugaring mark to while loop
camsteffen Aug 19, 2021
9c2d52f
Add desugaring mark to while loop
camsteffen Aug 19, 2021
fb0353b
Update documentation and name for non_send_fields_in_send_ty lint
Qwaz Oct 2, 2021
eec856b
Make diangostic item names consistent
camsteffen Oct 2, 2021
e165c12
Make diangostic item names consistent
camsteffen Oct 2, 2021
c70b35e
Auto merge of #84267 - dtolnay:ptrunit, r=nagisa
bors Oct 3, 2021
3da9dea
Add test for issue 89118.
hameerabbasi Oct 3, 2021
dc40430
Move test to correct path.
hameerabbasi Oct 3, 2021
77f1e50
Auto merge of #89479 - camsteffen:diag-naming, r=Manishearth
bors Oct 3, 2021
250d126
Add `deref_into_dyn_supertrait` lint.
crlf0710 Oct 2, 2021
fb0b1a5
Follow the diagnostic output style guide
hkmatsumoto Oct 3, 2021
c24c906
Auto merge of #88060 - TennyZhuang:optimize-vec-retain, r=dtolnay
bors Oct 3, 2021
3818981
Practice diagnostic message convention
hkmatsumoto Oct 3, 2021
53bc9cf
Add documentation to Box conversions
timClicks Sep 23, 2021
caa61b5
Merge branch '51430-document-from' of github.com:timClicks/rust into …
timClicks Oct 3, 2021
ea8e65f
exclude enum from derivable impls
HKalbasi Oct 3, 2021
33c34fb
Auto merge of #7709 - Qwaz:drop_non_send, r=xFrednet
bors Oct 3, 2021
32e19fb
Update Let's Encrypt ROOT CA certificate in dist-(i686|x86_64)-linux …
hkratz Oct 3, 2021
0ebc656
Change not enum to is struct
HKalbasi Oct 3, 2021
63b04f7
Auto merge of #7755 - HKalbasi:master, r=xFrednet
bors Oct 3, 2021
4479cb8
Auto merge of #89459 - tspiteri:idiv-overflow-bitand, r=kennytm
bors Oct 3, 2021
d6a7e74
Combined 4 commits into 1
zvavybir Oct 2, 2021
cf19131
Try to recover from a `=>` -> `=` or `->` typo in a match arm
FabianWolff Oct 3, 2021
a0cc9bb
Add a test to detect overlapping entries in overview tables
dns2utf8 Sep 10, 2021
677fb6b
Show how many tests are running in parallel
dns2utf8 Sep 11, 2021
e599e2d
Move from grid layout to table based layout because of browser limits…
dns2utf8 Sep 11, 2021
9626f2b
Fix extra `non_snake_case` warning for shorthand field bindings
FabianWolff Oct 2, 2021
5051904
Auto merge of #87870 - WaffleLapkin:pub_split_at_unchecked, r=dtolnay
bors Oct 3, 2021
529c353
Fix unsound optimization with explicit variant discriminants
FabianWolff Oct 3, 2021
b66dfaa
Move some HashStable impls.
cjgillot Sep 19, 2021
8961616
Move rustc_middle::middle::cstore to rustc_session.
cjgillot Nov 14, 2020
2d38c53
Remove StableHashProvider.
cjgillot Sep 29, 2021
c355b2e
Move ICH to rustc_query_system.
cjgillot Nov 14, 2020
02025d8
Remove re-export.
cjgillot Nov 14, 2020
471cb5c
Fully remove rustc_middle::ich.
cjgillot Nov 14, 2020
fedd778
Access StableHashingContext in rustc_query_system.
cjgillot Sep 25, 2021
48ae6ec
Update ui-fulldeps.
cjgillot Sep 26, 2021
b2ed9c4
Add some inlining.
cjgillot Oct 3, 2021
6dd6e7c
Added tracking issue numbers for int_abs_diff.
orlp Oct 3, 2021
9f4cb86
Replace Fn impls with RPIT impls in rustc_index
bjorn3 Oct 2, 2021
e34fd54
Deny `where` clauses on `auto` traits
FabianWolff Oct 3, 2021
08759c6
Auto merge of #88086 - ssomers:btree_clone_testing, r=dtolnay
bors Oct 3, 2021
1c2ad79
Add two inline annotations for hot functions
Mark-Simulacrum Oct 3, 2021
9dbb26e
Auto merge of #89486 - rusticstuff:docker_letsencrypt_ca_update, r=Ma…
bors Oct 3, 2021
a28a78f
Fix ICE with buffered lint referring to AST node deleted by everybody…
FabianWolff Oct 3, 2021
20489ea
Update comments
FabianWolff Oct 3, 2021
70e55a8
Apply suggestions
a1phyr Oct 3, 2021
4846fd9
Revert suggested use of `unwrap_or`
a1phyr Oct 3, 2021
dd9b476
Disable `SimplifyBranchSame` optimization for now
FabianWolff Oct 3, 2021
e3996ff
Fix Lower/UpperExp formatting for integers and precision zero
FabianWolff Oct 3, 2021
e737694
Auto merge of #88175 - camsteffen:let-desugar-span, r=Manishearth
bors Oct 3, 2021
87bb18e
Auto merge of #88175 - camsteffen:let-desugar-span, r=Manishearth
bors Oct 3, 2021
5b66048
Add regression test for spurious const error with NLL
Aaron1011 Oct 3, 2021
2a57a46
Extract a portion of diff writing code to separate function
Nicholas-Baron Oct 3, 2021
3760c91
Make write_rustdoc_diff a more generic function
Nicholas-Baron Oct 4, 2021
fdd8a0d
Don't suggest replacing region with 'static in NLL
Aaron1011 Oct 3, 2021
199b33f
Use a test value that doesn't depend on the handling of even/odd roun…
joshtriplett Oct 4, 2021
d25de31
Auto merge of #89165 - jkugelman:read-to-end-overallocation, r=joshtr…
bors Oct 4, 2021
55a3c86
:arrow_up: rust-analyzer
lnicola Oct 4, 2021
22714ed
Rollup merge of #86434 - CDirkx:ipv6-benchmarking, r=joshtriplett
Manishearth Oct 4, 2021
287af04
Rollup merge of #86828 - lambinoo:67441-const-fn-copied-take-replace,…
Manishearth Oct 4, 2021
0f9e960
Rollup merge of #87679 - ssomers:btree_comments, r=joshtriplett
Manishearth Oct 4, 2021
e500f1c
Rollup merge of #87910 - iago-lito:mark_unsafe_nonzero_arithmetics_as…
Manishearth Oct 4, 2021
f2ec71f
Rollup merge of #88286 - LeSeulArtichaut:unnecessary-unsafe-block-std…
Manishearth Oct 4, 2021
e4d257e
Rollup merge of #88305 - ijackson:exitstatus-debug, r=dtolnay
Manishearth Oct 4, 2021
70d82e0
Rollup merge of #88353 - jhpratt:stabilize-array-as-ref, r=joshtriplett
Manishearth Oct 4, 2021
5e66ba7
Rollup merge of #88370 - Seppel3210:master, r=dtolnay
Manishearth Oct 4, 2021
5215b85
Rollup merge of #88481 - bjorn3:remove_feature_gates, r=cjgillot
Manishearth Oct 4, 2021
c167eee
Rollup merge of #89138 - newpavlov:patch-2, r=dtolnay
Manishearth Oct 4, 2021
d236c04
Rollup merge of #89401 - owengage:master, r=joshtriplett
Manishearth Oct 4, 2021
8c7c689
Rollup merge of #89467 - tniessen:rustdoc-unecessary, r=jyn514
Manishearth Oct 4, 2021
e021a10
Rollup merge of #89472 - nagisa:nagisa/wsa-cleanup, r=dtolnay
Manishearth Oct 4, 2021
5c5dde8
Rollup merge of #89505 - Aaron1011:nll-const-test, r=Mark-Simulacrum
Manishearth Oct 4, 2021
bce8621
Stabilize `const_panic`
jhpratt Oct 4, 2021
9cb30f4
Move generic error message to separate branches
JulianKnodt Sep 28, 2021
44593ae
Auto merge of #89512 - Manishearth:rollup-meh9x7r, r=Manishearth
bors Oct 4, 2021
a8a40ea
librustdoc: Use correct heading levels.
Oct 1, 2021
03fbc16
Add doc aliases to `std::thread::available_parallelism`
yoshuawuyts Oct 4, 2021
00152d8
Stabilize try_reserve
kornelski Aug 29, 2021
a479766
Auto merge of #89489 - FabianWolff:issue-89485, r=oli-obk
bors Oct 4, 2021
175b8db
Auto merge of #88834 - the8472:char-count, r=joshtriplett
bors Oct 4, 2021
72f0180
Fix ICE in `implicit_hasher`
giraffate Oct 4, 2021
32a5abc
Make `proc_macro_derive_resolution_fallback` a future-breakage lint
Aaron1011 Oct 4, 2021
47edde1
Optimize `saturating_add_signed`
a1phyr Oct 4, 2021
3311b36
Auto merge of #7761 - giraffate:fix_ice_in_inplicit_hasher, r=Manishe…
bors Oct 4, 2021
388a3d0
Implement equatable if let lint
HKalbasi Oct 4, 2021
40fe064
Add a check for duplicated doc aliases in unused lint
GuillaumeGomez Oct 1, 2021
013aa37
Add test for duplicated doc aliases
GuillaumeGomez Oct 1, 2021
388bcc1
Fix suggestion to borrow when casting from pointer to reference
FabianWolff Oct 4, 2021
abe551e
Auto merge of #7762 - HKalbasi:master, r=Manishearth
bors Oct 4, 2021
079c075
Use `TokenKind::similar_tokens()`
FabianWolff Oct 4, 2021
4e9cf04
Rollup merge of #83655 - sebpop:arm64-outline-atomics, r=workingjubilee
workingjubilee Oct 4, 2021
ca8a108
Rollup merge of #87091 - the8472:more-advance-by-impls, r=joshtriplett
workingjubilee Oct 4, 2021
a2c6075
Rollup merge of #88451 - theo-lw:issue-87771, r=jackh726
workingjubilee Oct 4, 2021
19d9a14
Rollup merge of #88452 - xu-cheng:vecdeque-from-array, r=m-ou-se
workingjubilee Oct 4, 2021
9e387cf
Rollup merge of #89400 - Nitepone:nitepone/map-or-else-docfix, r=dtolnay
workingjubilee Oct 4, 2021
9381d7a
Rollup merge of #89407 - pierwill:recommend-clean-E0514, r=davidtwco
workingjubilee Oct 4, 2021
e1478d6
Rollup merge of #89443 - cuviper:btree-hash-len, r=dtolnay
workingjubilee Oct 4, 2021
b115a16
Rollup merge of #89444 - notriddle:notriddle/contains-str, r=jyn514
workingjubilee Oct 4, 2021
08dd414
Rollup merge of #89447 - FabianWolff:issue-89388, r=davidtwco
workingjubilee Oct 4, 2021
2bc89ce
Rollup merge of #89453 - waywardmonkeys:consistent-supertrait-usage, …
workingjubilee Oct 4, 2021
5352e17
Rollup merge of #89483 - hkmatsumoto:patch-diagnostics-2, r=estebank
workingjubilee Oct 4, 2021
3d4467d
Rollup merge of #89500 - FabianWolff:issue-87308, r=petrochenkov
workingjubilee Oct 4, 2021
9866b09
Rollup merge of #89508 - jhpratt:stabilize-const_panic, r=joshtriplett
workingjubilee Oct 4, 2021
003d8d3
Auto merge of #89530 - workingjubilee:rollup-ua14iq6, r=workingjubilee
bors Oct 4, 2021
02c2a35
Discuss field-sensitivity and enums in context of `MaybeLiveLocals`
ecstatic-morse Oct 4, 2021
9f9f7f6
Ensure that `MaybeLiveLocals` works with simple sum-type assignments
ecstatic-morse Oct 4, 2021
ccd2be5
fix busted JavaScript in error index generator
notriddle Oct 4, 2021
e5d0178
update Miri
RalfJung Oct 4, 2021
4a6aa6e
Fix heading for methods on trait impls.
Oct 5, 2021
c35a700
Make an initial guess for metadata size to reduce buffer resizes
joshtriplett Oct 5, 2021
6518a0a
Change `Markdown(...)` to `Markdown { ... }`
Oct 5, 2021
13558ee
No need to default offset since we always override it.
Oct 5, 2021
f1425c7
heading_level: u32 -> heading_offset: HeadingOffset
Oct 5, 2021
08a4f24
Add tests for ensuring docblock headings.
Oct 5, 2021
99e6e3f
Rollup merge of #87993 - kornelski:try_reserve_stable, r=joshtriplett
workingjubilee Oct 5, 2021
4f6afee
Rollup merge of #88090 - nbdd0121:inference, r=nikomatsakis
workingjubilee Oct 5, 2021
234fa90
Rollup merge of #88780 - orlp:int-abs-diff, r=m-ou-se
workingjubilee Oct 5, 2021
7aa9ce5
Rollup merge of #89270 - seanyoung:join_fold, r=m-ou-se
workingjubilee Oct 5, 2021
05b4cd6
Rollup merge of #89413 - matthewjasper:spec-marker-fix, r=nikomatsakis
workingjubilee Oct 5, 2021
a19537d
Rollup merge of #89456 - cuviper:llvm-13, r=nikic
workingjubilee Oct 5, 2021
36f173f
Rollup merge of #89466 - Mark-Simulacrum:query-macros, r=oli-obk
workingjubilee Oct 5, 2021
c2bfe45
Rollup merge of #89473 - FabianWolff:issue-89469, r=joshtriplett
workingjubilee Oct 5, 2021
02b52ca
Rollup merge of #89474 - camelid:better-pass-name, r=jyn514
workingjubilee Oct 5, 2021
ec41455
Rollup merge of #89478 - zvavybir:master, r=jyn514
workingjubilee Oct 5, 2021
25cc28e
Rollup merge of #89480 - hameerabbasi:issue-89118-test, r=jackh726
workingjubilee Oct 5, 2021
90e96f9
Rollup merge of #89487 - FabianWolff:issue-89396, r=petrochenkov
workingjubilee Oct 5, 2021
c9158db
Rollup merge of #89494 - FabianWolff:issue-84075, r=davidtwco
workingjubilee Oct 5, 2021
92dbb69
Rollup merge of #89511 - lnicola:rust-analyzer-2021-10-04, r=lnicola
workingjubilee Oct 5, 2021
2ae8ced
Rollup merge of #89536 - RalfJung:miri, r=RalfJung
workingjubilee Oct 5, 2021
a804c4b
Auto merge of #89545 - workingjubilee:rollup-ooxf3p2, r=workingjubilee
bors Oct 5, 2021
c79447e
library std, libc dependency update
devnexen Oct 4, 2021
0fb0122
Rollup merge of #87631 - :solarish_upd_fs, r=joshtriplett
Manishearth Oct 5, 2021
7a09755
Rollup merge of #88234 - hkmatsumoto:rustdoc-impls-for-primitive, r=j…
Manishearth Oct 5, 2021
dd223d5
Rollup merge of #88651 - AGSaidi:monotonize-inner-64b-aarch64, r=dtolnay
Manishearth Oct 5, 2021
52d3afa
Rollup merge of #88816 - dns2utf8:rustdoc_test_gui_2k_constants, r=Gu…
Manishearth Oct 5, 2021
eeadc9d
Rollup merge of #89244 - DeveloperC286:pair_slices_fields_to_private,…
Manishearth Oct 5, 2021
27b84a9
Rollup merge of #89364 - hkmatsumoto:encode-json-with-utf-8, r=Mark-S…
Manishearth Oct 5, 2021
87f782e
Rollup merge of #89423 - DevinR528:reachable-fields, r=Nadrieril
Manishearth Oct 5, 2021
94b72f4
Rollup merge of #89426 - davidtwco:bootstrap-nix-toolchain-env-var, r…
Manishearth Oct 5, 2021
a23d7f0
Rollup merge of #89462 - devnexen:haiku_thread_aff_build_fix, r=nagisa
Manishearth Oct 5, 2021
04314a6
Rollup merge of #89482 - hkmatsumoto:patch-diagnostics, r=joshtriplett
Manishearth Oct 5, 2021
bf62c6d
Rollup merge of #89504 - Aaron1011:rpit-nll-static, r=nikomatsakis
Manishearth Oct 5, 2021
068683b
Rollup merge of #89535 - notriddle:notriddle/error-index-generator-js…
Manishearth Oct 5, 2021
074f636
Auto merge of #89549 - Manishearth:rollup-mhkyc16, r=Manishearth
bors Oct 5, 2021
55111d6
Auto merge of #89266 - cjgillot:session-ich, r=michaelwoerister
bors Oct 5, 2021
25ec827
Auto merge of #89363 - oli-obk:in_tracing_we_trust, r=Mark-Simulacrum
bors Oct 5, 2021
4ec0377
for signed overflowing remainder, delay comparing lhs with MIN
tspiteri Oct 5, 2021
67a82e2
RustWrapper: adapt for LLVM API change of fatal_error_handler_t
krasimirgg Oct 5, 2021
10cdbd8
Make cfg implicitly imply doc(cfg)
Nemo157 Nov 3, 2020
18fdd81
Allow adding a set of cfg's to hide from being implicitly doc(cfg)'d
Nemo157 Nov 4, 2020
0031ce3
Suppress some cfg from being shown in the stdlib docs
Nemo157 Nov 4, 2020
e36a370
Add test case for `doc_cfg_hide` feature gate
jyn514 Feb 24, 2021
56e5f61
Add `cfg_hide` to the list of known attributes
jyn514 Apr 23, 2021
b2e4e59
refactor: VecDeques Drain fields to private
DeveloperC286 Sep 17, 2021
5af61cb
refactor: VecDeques IterMut fields to private
DeveloperC286 Sep 25, 2021
3c974ad
Note specific regions involved in 'borrowed data escapes' error
Aaron1011 Oct 3, 2021
7c82e78
improved help message for `suspicious_map`
zvavybir Oct 5, 2021
320ecb1
Mentioned `inspect` in lint description of `suspicious_map`
zvavybir Oct 5, 2021
b9dedf3
Auto merge of #7770 - zvavybir:master, r=xFrednet
bors Oct 5, 2021
960e49e
Rollup merge of #88706 - ThePuzzlemaker:issue-88609, r=jackh726
Manishearth Oct 5, 2021
eb86098
Rollup merge of #88828 - FabianWolff:issue-88585, r=dtolnay
Manishearth Oct 5, 2021
60b9c5d
Rollup merge of #88871 - FabianWolff:issue-88403, r=jackh726
Manishearth Oct 5, 2021
0352a28
Rollup merge of #89317 - JulianKnodt:precise_errors, r=BoxyUwU
Manishearth Oct 5, 2021
e745e09
Rollup merge of #89351 - tspiteri:wrapping_rem, r=dtolnay
Manishearth Oct 5, 2021
80f1f0d
Rollup merge of #89442 - GuillaumeGomez:duplicated-doc-alias, r=estebank
Manishearth Oct 5, 2021
4e8c853
Rollup merge of #89502 - FabianWolff:issue-89493, r=joshtriplett
Manishearth Oct 5, 2021
048b0fd
Rollup merge of #89523 - Aaron1011:derive-future-compat, r=wesleywiser
Manishearth Oct 5, 2021
f71b3e2
Rollup merge of #89532 - ecstatic-morse:maybe-live-locals-enum, r=oli…
Manishearth Oct 5, 2021
5f8b161
Rollup merge of #89546 - joshtriplett:grow-metadata-faster, r=petroch…
Manishearth Oct 5, 2021
98a5a98
Auto merge of #89572 - Manishearth:rollup-obz5ycp, r=Manishearth
bors Oct 5, 2021
e8fc076
Consider unfulfilled obligations in binop errors
estebank Sep 28, 2021
a15879d
Emit item no type error even if type inference fails
nbdd0121 Oct 6, 2021
b4c62d5
Add regression test for ice 89574
nbdd0121 Oct 6, 2021
edfd6d5
test
BoxyUwU Oct 6, 2021
d7539a6
Auto merge of #89323 - estebank:derive-binop, r=petrochenkov
bors Oct 6, 2021
42f2304
Drop exponent suggestion when 0
dswij Oct 6, 2021
0e481b9
Return to generating mod declarations in lib.rs
Manishearth Oct 6, 2021
d9488c5
Regen update_lints
Manishearth Oct 6, 2021
e476d05
Add tests for zero exponents in `excessive_precision`
dswij Oct 6, 2021
871b8b5
Auto merge of #7773 - Manishearth:update-lints-mods, r=flip1995
bors Oct 6, 2021
c6b9158
Auto merge of #7774 - dswij:useless-exponent, r=llogiq
bors Oct 6, 2021
b386959
fix: alloc-optimisation is only for rust llvm
infinity0 Oct 6, 2021
742d8be
Restore h1 styles, which got accidentally removed.
Oct 6, 2021
1f86a8e
Revert the rustc_error_codes changes.
Oct 6, 2021
8b37928
Fix typos
tsoutsman Oct 6, 2021
a412880
Switch to our own mirror of libisl
Mark-Simulacrum Oct 6, 2021
b9d753e
Auto merge of #7776 - tsoutsman:patch-1, r=flip1995
bors Oct 6, 2021
33b9b95
Introduce get_diagnostic_name
camsteffen Oct 4, 2021
80408ef
Add regression test for #7758
Manishearth Oct 6, 2021
94e1413
reset and cleanup
shamatar Oct 6, 2021
2a8d7bd
Handle intra-doc links in doc_markdown
Manishearth Oct 6, 2021
d61f95f
fix import
shamatar Oct 6, 2021
109d5c7
add MIR artifacts
shamatar Oct 6, 2021
b5f9cdb
Get rid of broken `ct-ng oldconfig` everywhere and directly provide a…
hkratz Oct 6, 2021
8562d94
tidy
shamatar Oct 6, 2021
d480cef
Auto merge of #89599 - rusticstuff:ci-fix, r=Mark-Simulacrum
bors Oct 6, 2021
4c3465c
run remaining tests
shamatar Oct 6, 2021
b6cab80
Use get_diagnostic_name
camsteffen Oct 4, 2021
8fac41a
Clean up code a bit:
GuillaumeGomez Oct 6, 2021
a31518f
opt-level >= 4
shamatar Oct 6, 2021
a8d8bfd
Bless tests
camsteffen Oct 6, 2021
11492c7
Auto merge of #7772 - Manishearth:doc-markdown-intra, r=camsteffen
bors Oct 6, 2021
09c7688
Simplify AttributesExt::cfg function and remove error emissions since…
GuillaumeGomez Oct 6, 2021
3209582
Rollup merge of #87601 - a1phyr:feature_uint_add_signed, r=kennytm
Manishearth Oct 6, 2021
1e3b5d6
Rollup merge of #88523 - kpreid:category, r=yaahc
Manishearth Oct 6, 2021
91e3b51
Rollup merge of #89050 - DeveloperC286:drain_fields_to_private, r=jos…
Manishearth Oct 6, 2021
14da7fc
Rollup merge of #89245 - DeveloperC286:iter_mut_fields_to_private, r=…
Manishearth Oct 6, 2021
b4615b5
Rollup merge of #89324 - yoshuawuyts:hardware-parallelism, r=m-ou-se
Manishearth Oct 6, 2021
b87a9a8
Rollup merge of #89329 - tmiasko:print-type-sizes-no-fields, r=jackh726
Manishearth Oct 6, 2021
b015940
Rollup merge of #89501 - Aaron1011:escaping-name-regions, r=davidtwco
Manishearth Oct 6, 2021
7d6feb4
Rollup merge of #89506 - yaymukund:docblock-headings, r=GuillaumeGomez
Manishearth Oct 6, 2021
f5bfa34
Rollup merge of #89528 - FabianWolff:issue-89497, r=jackh726
Manishearth Oct 6, 2021
79a1fc8
Rollup merge of #89531 - devnexen:stack_overflow_bsd_libc_upd, r=dtolnay
Manishearth Oct 6, 2021
eb7da35
Rollup merge of #89588 - BoxyUwU:add_a_test_uwu, r=lcnr
Manishearth Oct 6, 2021
f31c805
Rollup merge of #89591 - infinity0:master, r=Amanieu
Manishearth Oct 6, 2021
0eabf25
Auto merge of #89608 - Manishearth:rollup-m7kd76f, r=Manishearth
bors Oct 6, 2021
549a68b
Add InferCtxt::with_opaque_type_inference to get_body_with_borrowck_f…
willcrichton Oct 7, 2021
d3e6770
Auto merge of #89454 - erikdesjardins:perfattrcheck, r=nikomatsakis
bors Oct 7, 2021
8f075ec
Revert `update_lints` module list generating code
Oct 7, 2021
01ea06a
Auto merge of #7780 - mikerite:update_lints_mod_revert, r=llogiq
bors Oct 7, 2021
ca8078d
Auto merge of #89495 - Mark-Simulacrum:add-inlines, r=michaelwoerister
bors Oct 7, 2021
1f95515
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Oct 7, 2021
9613df9
Allow invalid-paths for regex paths
flip1995 Oct 7, 2021
8f9ef87
Bump nightly version -> 2021-10-07
flip1995 Oct 7, 2021
b7f3f7f
Auto merge of #7783 - flip1995:rustup, r=flip1995
bors Oct 7, 2021
333a06a
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
flip1995 Oct 7, 2021
680ff86
Auto merge of #86525 - shamatar:array_len_opt, r=oli-obk
bors Oct 7, 2021
0157cc9
Auto merge of #89534 - camsteffen:diag-name, r=oli-obk
bors Oct 7, 2021
1584b6a
Rollup merge of #89298 - gcohara:issue89193, r=workingjubilee
GuillaumeGomez Oct 7, 2021
ab276b8
Rollup merge of #89461 - crlf0710:dyn_upcasting_lint, r=nikomatsakis
GuillaumeGomez Oct 7, 2021
48548c9
Rollup merge of #89477 - Nicholas-Baron:compute_diff_rs, r=Mark-Simul…
GuillaumeGomez Oct 7, 2021
110d289
Rollup merge of #89559 - krasimirgg:llvm-14-fatal_error_handler_t, r=…
GuillaumeGomez Oct 7, 2021
de0b4f9
Rollup merge of #89585 - nbdd0121:issue-89574, r=estebank
GuillaumeGomez Oct 7, 2021
e32328b
Rollup merge of #89596 - GuillaumeGomez:implicit-doc-cfg, r=jyn514
GuillaumeGomez Oct 7, 2021
0fbb011
Rollup merge of #89615 - willcrichton:fix-get-body-with-borrowck-fact…
GuillaumeGomez Oct 7, 2021
5641481
Auto merge of #89629 - GuillaumeGomez:rollup-s4r8me6, r=GuillaumeGomez
bors Oct 7, 2021
8965b58
Revert "Stabilize `Iterator::intersperse()`"
yaahc Oct 7, 2021
485ced5
Auto merge of #89617 - flip1995:clippyup, r=Manishearth
bors Oct 7, 2021
9771803
Update Miri
camelid Oct 7, 2021
2ee06e7
Auto merge of #89638 - rust-lang:revert-88548-intersperse, r=Mark-Sim…
bors Oct 7, 2021
c2171ee
Auto merge of #89646 - camelid:miri-up, r=RalfJung
bors Oct 8, 2021
6dd7fa1
Add documentation to Box conversions
timClicks Sep 23, 2021
78810bd
Add documentation to Box conversions
timClicks Sep 23, 2021
057236d
Increase precision of doc strings
timClicks Sep 23, 2021
a1c1256
Fix trailing whitespace
timClicks Sep 23, 2021
9398ea2
Correctly document the error behavior
timClicks Sep 23, 2021
aafa0a7
Improve grammar and remove guarantee that no allocation will occur
timClicks Sep 23, 2021
fc97fc1
Merge branch '51430-document-from' of github.com:timClicks/rust into …
timClicks Oct 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ impl<T> From<T> for Box<T> {
/// from the stack into it.
///
/// # Examples
///
/// ```rust
/// let x = 5;
/// let boxed = Box::new(5);
Expand Down Expand Up @@ -1330,6 +1331,10 @@ impl<T: Copy> From<&[T]> for Box<[T]> {
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "box_from_cow", since = "1.45.0")]
impl<T: Copy> From<Cow<'_, [T]>> for Box<[T]> {
/// Converts a `Cow<'_, [T]>` into a `Box<[T]>`
///
/// This conversion allocates on the heap
/// and performs a copy of `s`.
timClicks marked this conversation as resolved.
Show resolved Hide resolved
#[inline]
fn from(cow: Cow<'_, [T]>) -> Box<[T]> {
match cow {
Expand All @@ -1348,6 +1353,7 @@ impl From<&str> for Box<str> {
/// and performs a copy of `s`.
///
/// # Examples
///
/// ```rust
/// let boxed: Box<str> = Box::from("hello");
/// println!("{}", boxed);
Expand All @@ -1361,6 +1367,27 @@ impl From<&str> for Box<str> {
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "box_from_cow", since = "1.45.0")]
impl From<Cow<'_, str>> for Box<str> {
/// Converts a `Cow<'_, str>` into a `Box<str>`
///
/// This conversion allocates on the heap
/// and performs a copy of `cow`.
timClicks marked this conversation as resolved.
Show resolved Hide resolved
///
/// # Examples
///
/// ```rust
/// use std::borrow::Cow;
///
/// let unboxed = Cow::Borrowed("hello");
/// let boxed: Box<str> = Box::from(unboxed);
/// println!("{}", boxed);
/// ```
///
/// ```rust
/// # use std::borrow::Cow;
/// let unboxed = Cow::Owned("hello".to_string());
/// let boxed: Box<str> = Box::from(unboxed);
/// println!("{}", boxed);
/// ```
#[inline]
fn from(cow: Cow<'_, str>) -> Box<str> {
match cow {
Expand Down Expand Up @@ -1403,6 +1430,7 @@ impl<T, const N: usize> From<[T; N]> for Box<[T]> {
/// This conversion moves the array to newly heap-allocated memory.
///
/// # Examples
///
/// ```rust
/// let boxed: Box<[u8]> = Box::from([4, 2]);
/// println!("{:?}", boxed);
Expand All @@ -1416,6 +1444,14 @@ impl<T, const N: usize> From<[T; N]> for Box<[T]> {
impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]> {
type Error = Box<[T]>;

/// Attempts to convert a `Box<[T]>` into a `Box<[T; N]>`.
///
/// The conversion occurs in-place and does not require a
/// new memory allocation.
///
/// # Errors
///
/// Returns an error if `boxed_slice.len()` does not equal `N`.
timClicks marked this conversation as resolved.
Show resolved Hide resolved
fn try_from(boxed_slice: Box<[T]>) -> Result<Self, Self::Error> {
if boxed_slice.len() == N {
Ok(unsafe { Box::from_raw(Box::into_raw(boxed_slice) as *mut [T; N]) })
Expand Down