Pavel Grigorenko
ec921db289
impl CloneToUninit for str and CStr
2024-07-29 20:33:11 +03:00
Ben Kimock
f4f57bfccb
Make Clone::clone a lang item
2024-07-25 18:46:07 -04:00
hattizai
ada9fda7c3
chore: remove duplicate words
2024-07-02 11:25:31 +08:00
Kevin Reid
ec201b8650
Add core::clone::CloneToUninit
.
...
This trait allows cloning DSTs, but is unsafe to implement and use
because it writes to possibly-uninitialized memory which must be of the
correct size, and must initialize that memory.
It is only implemented for `T: Clone` and `[T] where T: Clone`, but
additional implementations could be provided for specific `dyn Trait`
or custom-DST types.
2024-06-22 08:08:00 -07:00
Trevor Gross
88bcc79f31
Revert "Put basic impls for f16 and f128 behind cfg(not(bootstrap))"
...
This reverts commit 049a917535
.
The resolution to <https://github.com/rust-lang/rust/issues/123282 > is
that the `f16`/`f128` regression in the beta compiler was fixable
without a revert, so the commit adding `#[cfg(not(bootstrap))]` is no
longer useful (added in
<https://github.com/rust-lang/rust/pull/123390 >).
Revert this commit because not having these basic impls bootstrap-gated
simplifies everything else that uses them.
2024-04-10 13:50:27 -04:00
Trevor Gross
049a917535
Put basic impls for f16 and f128 behind cfg(not(bootstrap))
...
We will lose `f16` and `f128` in the beta compiler after the revert for
<https://github.com/rust-lang/rust/issues/123282 > lands. Change what was
added in <https://github.com/rust-lang/rust/pull/123085 > to be behind
`#[cfg(not(bootstrap))]` to account for this.
2024-04-02 16:19:55 -04:00
Trevor Gross
d7d5fc9734
Add basic trait impls for f16
and f128
...
Split off part of <https://github.com/rust-lang/rust/pull/122470 > so the
compiler doesn't ICE because it expects primitives to have some minimal
traits.
Fixes <https://github.com/rust-lang/rust/issues/123074 >
2024-03-28 15:02:51 -04:00
surechen
40ae34194c
remove redundant imports
...
detects redundant imports that can be eliminated.
for #117772 :
In order to facilitate review and modification, split the checking code and
removing redundant imports code into two PR.
2023-12-10 10:56:22 +08:00
Martin Nordholts
c6566a8037
Explain more clearly why fn() -> T
can't be #[derive(Clone)]
2023-07-30 18:04:38 +02:00
Deadbeef
63e0ddbf1d
core is now compilable
2023-04-16 07:20:26 +00:00
Deadbeef
76dbe29104
rm const traits in libcore
2023-04-16 06:49:27 +00:00
Eduardo Sánchez Muñoz
00e7b54d46
Make some trivial functions #[inline(always)]
2022-12-07 17:11:17 +01:00
Pietro Albini
6b2d3d5f3c
update cfg(bootstrap)s
2022-07-01 15:48:23 +02:00
Michael Howell
7a93567005
docs: show Clone and Copy on () doc pages
2022-06-07 12:12:49 -07:00
Deadbeef
257f06587c
Remove #[default..]
and add #[const_trait]
2022-05-30 08:52:24 +00:00
Pietro Albini
181d28bb61
trivial cfg(bootstrap) changes
2022-04-05 23:18:40 +02:00
Deadbeef
1f3ee7f32e
Rename ~const Drop
to ~const Destruct
2022-03-21 17:04:03 +11:00
woppopo
662024478d
Make some Clone
impls const
2021-12-12 04:19:23 +09:00
bstrie
3024efff59
Update Copy/Clone documentation WRT arrays
2021-11-08 13:11:59 -05:00
Pietro Albini
b63ab8005a
update cfg(bootstrap)
2021-10-23 21:55:57 -04:00
Fabian Wolff
79adda930f
Ignore automatically derived impls of Clone
and Debug
in dead code analysis
2021-09-09 19:49:07 +02:00
qwerty01
2788c71dd4
Updates Clone
docs for Copy
comparison.
2021-06-10 11:28:26 -04:00
Ryan Levick
ee65416f0d
Fix core tests
2021-03-03 11:22:49 +01:00
Ryan Levick
a6d926d80d
Fix tests
2021-03-03 11:22:44 +01:00
Ryan Levick
f49ed7a6b7
Add tests and support two more noop methods
2021-03-03 11:22:17 +01:00
Ryan Levick
040735c110
First version of noop-lint
2021-03-03 11:22:16 +01:00
Denis Vasilik
3510c56887
Improve readability
2020-09-01 19:56:32 +02:00
Denis Vasilik
e7d074392e
Use intra-doc links
2020-09-01 19:20:15 +02:00
mark
2c31b45ae8
mv std libs to library/
2020-07-27 19:51:13 -05:00