Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fcf1571
Add Atomic*::from_mut.
m-ou-se Jul 19, 2020
09fff5f
Disable Atomic*::from_mut when alignment is wrong.
m-ou-se Aug 13, 2020
7cc2569
Add tracking issue number for atomic_from_mut.
m-ou-se Sep 5, 2020
15b660f
Merge remote-tracking branch 'origin/master' into atomic-from-mut
m-ou-se Sep 6, 2020
528f100
Disable Atomic{U128,I128}::from_mut on x86_64.
m-ou-se Sep 6, 2020
283d4c4
Ignore `|` and `+` tokens during proc-macro pretty-print check
Aaron1011 Sep 10, 2020
15aa6f3
add debug-logging to config.toml
guswynn Sep 10, 2020
fb8d070
Add ui test for 74672 and 76571
tesuji Sep 11, 2020
c3d048a
Ignore rustc_private items from std docs
tesuji Sep 10, 2020
439b766
replacing sub's that can wrap by saturating_sub's
ad-anssi Sep 11, 2020
f9059a4
add non-regression test for issue #76597
ad-anssi Sep 11, 2020
62068a5
repairing broken error message and rustfix application for the new test
ad-anssi Sep 11, 2020
56f5c7f
comments + add max_level_info so false works with debug_assertions on
guswynn Sep 11, 2020
0be66d7
just max_level_info
guswynn Sep 11, 2020
9500067
Use `is_unstable_const_fn` where appropriate
slightlyoutofphase Sep 12, 2020
0439556
Check basic constness before unstable constness
slightlyoutofphase Sep 12, 2020
4284aad
Fix formatting for tidy
slightlyoutofphase Sep 12, 2020
b1e481d
Simplify iter zip struct doc
pickfire Sep 12, 2020
869021e
Add mailmap entry
CDirkx Sep 12, 2020
9c13894
Fix `const-display.rs` XPATH queries (#1)
slightlyoutofphase Sep 12, 2020
8a1288b
Give functions unique names
slightlyoutofphase Sep 12, 2020
4f0047e
Add a comment on is_trivially_sized about obviously !Sized types
nox Sep 12, 2020
75f0f7a
Fix a typo
nox Sep 12, 2020
caf6c92
Clean up some language trait items comparisons
nox Sep 12, 2020
20e2b6b
Rollup merge of #74532 - fusion-engineering-forks:atomic-from-mut, r=…
Dylan-DPC Sep 12, 2020
46feb58
Rollup merge of #76571 - lzutao:rustdoc-private-traits, r=jyn514
Dylan-DPC Sep 12, 2020
e15c3aa
Rollup merge of #76585 - Aaron1011:ignore-vert-plus, r=petrochenkov
Dylan-DPC Sep 12, 2020
9c9c642
Rollup merge of #76588 - guswynn:debug_logging, r=jyn514,Mark-Simulacrum
Dylan-DPC Sep 12, 2020
d53086a
Rollup merge of #76598 - ad-anssi:diagnostic_errors_fix, r=estebank
Dylan-DPC Sep 12, 2020
c369622
Rollup merge of #76623 - slightlyoutofphase:master, r=jyn514
Dylan-DPC Sep 12, 2020
bf89f27
Rollup merge of #76629 - pickfire:patch-4, r=jonas-schievink
Dylan-DPC Sep 12, 2020
e2d99c1
Rollup merge of #76641 - nox:pointee-random-stuff, r=eddyb
Dylan-DPC Sep 12, 2020
55643ee
Rollup merge of #76646 - CDirkx:mailmap, r=Mark-Simulacrum
Dylan-DPC Sep 12, 2020
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
Prev Previous commit
Next Next commit
Add a comment on is_trivially_sized about obviously !Sized types
  • Loading branch information
nox committed Sep 12, 2020
commit 4f0047ed108889ea97ad7656307a8a829dd56636
6 changes: 6 additions & 0 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,12 @@ impl<'tcx> TyS<'tcx> {
///
/// Returning true means the type is known to be sized. Returning
/// `false` means nothing -- could be sized, might not be.
///
/// Note that we could never rely on the fact that a type such as `[_]` is
/// trivially `!Sized` because we could be in a type environment with a
/// bound such as `[_]: Copy`. A function with such a bound obviously never
/// can be called, but that doesn't mean it shouldn't typecheck. This is why
/// this method doesn't return `Option<bool>`.
pub fn is_trivially_sized(&self, tcx: TyCtxt<'tcx>) -> bool {
match self.kind() {
ty::Infer(ty::IntVar(_) | ty::FloatVar(_))
Expand Down