Skip to content

Rollup of 18 pull requests #74308

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

Closed
wants to merge 81 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
37570e8
Substantial refactor to the design of LineWriter
Lucretiel May 29, 2020
0f38158
Updated comments; only pre-flush newline terminated buffers
Lucretiel May 31, 2020
4a1597f
Expressionify `LineWriterShim::write`
Lucretiel May 31, 2020
5edad37
Expressionify write_all
Lucretiel May 31, 2020
1bf8ba3
x.py fmt
Lucretiel May 31, 2020
e0dfdc6
Added check for `is_write_vectored`
Lucretiel Jun 1, 2020
2c3024b
Add comment describing erroneous_flush_retried
Lucretiel Jun 1, 2020
e89e2e4
Added test stubs
Lucretiel Jun 1, 2020
f0a0807
Various testing & implementation updates:
Lucretiel Jun 1, 2020
b6296e8
Tons of testing updates, other minor changes
Lucretiel Jun 2, 2020
e022d34
Fixed typo in test
Lucretiel Jun 2, 2020
e4328ae
Code review updates: all minor style fixes
Lucretiel Jun 2, 2020
f7650fe
Add comment
Lucretiel Jun 2, 2020
7a6a12b
Tidy fixes
Lucretiel Jun 2, 2020
338a2c0
Reimplement flush_buf with a Guard. Longer, but cleaner.
Lucretiel Jun 2, 2020
c869638
Added comment about BufWrite::write_all
Lucretiel Jun 2, 2020
61f591e
Improved line_vectored_ignored. Added stylistic semicolon.
Lucretiel Jun 2, 2020
2d22c77
Fixed bug in write_vectored & empty buffers
Lucretiel Jun 2, 2020
2c23b90
Comment updates
Lucretiel Jun 2, 2020
e999ca5
Remove inline from write_to_buf
Lucretiel Jun 2, 2020
70ba320
More minor changes
Lucretiel Jun 2, 2020
5b1a40c
BufWriter::write* methods now use fewer runtime checks
Lucretiel Jun 2, 2020
8df5ae0
x.py fix AGAIN
Lucretiel Jun 2, 2020
60ab99f
Fixed corner case related to partial-line buffering
Lucretiel Jun 2, 2020
38017a3
Update comments with relevant issue numbers
Lucretiel Jun 2, 2020
59710fb
Clarified comment in `partial_multiline_buffering` test
Lucretiel Jun 2, 2020
2e21af2
Document the union keyword
poliorcetics Jun 29, 2020
614f773
Clarify some parts by applying the suggestions from review
poliorcetics Jun 30, 2020
310c97b
Fix caching issue when building tools.
ehuss Jul 4, 2020
c478b54
add as_ptr method to raw slices
RalfJung Jul 3, 2020
3b1d5e6
call the mut version as_mut_ptr and also add an as_ptr-like method to…
RalfJung Jul 3, 2020
90580c7
make unchecked slice indexing helper methods use raw pointers
RalfJung Jul 5, 2020
5f5c98b
add (unchecked) indexing methods to raw pointers and NonNull
RalfJung Jul 5, 2020
00980b6
clean up E0718 explanation
GuillaumeGomez Jul 7, 2020
c8b16cd
rustdoc: Allow linking from private items to private types
dennis-hamester Jul 8, 2020
23d7b3f
Remove an unwrap in layout computation
erikdesjardins Jul 10, 2020
689e360
test: rustdoc-ui: Add issue-74134, replacing test/rustdoc/issue-74134-*
dennis-hamester Jul 11, 2020
b8632e1
Removed FIXME
Lucretiel Jul 11, 2020
140bfc5
Removed another FIXME
Lucretiel Jul 11, 2020
9704859
test: rustdoc-ui: Expand issue-74134 to cover types in a private module
dennis-hamester Jul 11, 2020
8789525
test: rustdoc-ui: issue-74134: Shorten a too long line
dennis-hamester Jul 11, 2020
0979545
rustdoc: insert newlines between attributes
euclio Jun 28, 2020
4728438
Improve wording
GuillaumeGomez Jul 11, 2020
997accc
Remove doubled "is_write_vectored"
Lucretiel Jul 11, 2020
6a7b5df
Removed unused method
Lucretiel Jul 11, 2020
905b5ad
don't mark linux kernel module targets as a unix environment
alex Jul 11, 2020
606593f
Minor updates
Lucretiel Jul 12, 2020
8082fb9
rename fast_thread_local -> thread_local_dtor; thread_local -> thread…
RalfJung Jul 12, 2020
7dc3886
adjust remaining targets
RalfJung Jul 12, 2020
ff5e107
assign tracking issue
RalfJung Jul 12, 2020
5afbc52
typeck: report placeholder type error w/out span
davidtwco Jul 12, 2020
5daedea
Detect tuple struct incorrectly used as struct pat
estebank Jul 9, 2020
ffac887
Update RELEASES.md for 1.45.0
XAMPPRocky Jun 14, 2020
0e89f50
Clean up handling of style files in rustdoc
Cldfire Jul 12, 2020
8c45cf8
Add Ayu theme to rustdoc
Cldfire Jul 12, 2020
ed587f8
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit whi…
AdrianCX Jul 11, 2020
c24b96d
Teach bootstrap about target files vs target triples
shepmaster Jul 2, 2020
9a3a31a
Added tests for volatile and nearbyint intrinsics
theo-lw Jul 13, 2020
5ff7e1a
Added ui tests for volatile and nearby intrinsics
theo-lw Jul 13, 2020
eac8092
Removed trailing whitespace
theo-lw Jul 13, 2020
e3ae4c7
Added proper explanation of ErrorCode-E0688
Polkaverse Jul 13, 2020
bc2b37a
Merge branch 'master' into E0688
Polkaverse Jul 13, 2020
8df79fc
Remove trailing whitespace
theo-lw Jul 13, 2020
d0ec58c
Rollup merge of #71237 - Cldfire:rustdoc-ayu-theme, r=GuilliaumeGomez
Manishearth Jul 13, 2020
ce04962
Rollup merge of #72808 - Lucretiel:line-writer-reimpl, r=Amanieu
Manishearth Jul 13, 2020
70ea364
Rollup merge of #73354 - XAMPPRocky:relnotes-1.45.0, r=Mark-Simulacrum
Manishearth Jul 13, 2020
2481ade
Rollup merge of #73852 - euclio:rustdoc-attr-newlines, r=GuillaumeGomez
Manishearth Jul 13, 2020
0663d5e
Rollup merge of #73867 - poliorcetics:union-keyword, r=joshtriplett
Manishearth Jul 13, 2020
51a8ce1
Rollup merge of #73986 - RalfJung:raw-slice-as-ptr, r=sfackler
Manishearth Jul 13, 2020
1b0c024
Rollup merge of #74046 - ehuss:deny-warnings-caching, r=Mark-Simulacrum
Manishearth Jul 13, 2020
3282046
Rollup merge of #74123 - GuillaumeGomez:cleanup-e0718, r=pickfire
Manishearth Jul 13, 2020
75517fb
Rollup merge of #74147 - dennis-hamester:fix/issue-74134, r=jyn514
Manishearth Jul 13, 2020
7913222
Rollup merge of #74173 - estebank:struct-pat-as-enum, r=petrochenkov
Manishearth Jul 13, 2020
206a09a
Rollup merge of #74227 - erikdesjardins:layun, r=estebank
Manishearth Jul 13, 2020
bd2d6d8
Rollup merge of #74239 - AdrianCX:master, r=cuviper
Manishearth Jul 13, 2020
44eeb0e
Rollup merge of #74251 - shepmaster:bootstrap-target-files, r=Mark-Si…
Manishearth Jul 13, 2020
7ff75b1
Rollup merge of #74257 - alex:patch-1, r=joshtriplett
Manishearth Jul 13, 2020
a539985
Rollup merge of #74263 - RalfJung:thread-local, r=Mark-Simulacrum
Manishearth Jul 13, 2020
dac2909
Rollup merge of #74270 - davidtwco:issue-74086-more-placeholder-type-…
Manishearth Jul 13, 2020
0a7bbce
Rollup merge of #74285 - wangtheo:issue-71669, r=lcnr
Manishearth Jul 13, 2020
2f20d96
Rollup merge of #74286 - PankajChaudhary5:E0688, r=GuillaumeGomez
Manishearth Jul 13, 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
18 changes: 18 additions & 0 deletions src/test/codegen/intrinsics/nearby.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#![crate_type = "lib"]
#![feature(core_intrinsics)]

use std::intrinsics;

// CHECK-LABEL: @nearbyintf32
#[no_mangle]
pub unsafe fn nearbyintf32(a: f32) -> f32 {
// CHECK: llvm.nearbyint.f32
intrinsics::nearbyintf32(a)
}

// CHECK-LABEL: @nearbyintf64
#[no_mangle]
pub unsafe fn nearbyintf64(a: f64) -> f64 {
// CHECK: llvm.nearbyint.f64
intrinsics::nearbyintf64(a)
}
55 changes: 55 additions & 0 deletions src/test/codegen/intrinsics/volatile.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// compile-flags: -C no-prepopulate-passes

#![crate_type = "lib"]
#![feature(core_intrinsics)]

use std::intrinsics;

// CHECK-LABEL: @volatile_copy_memory
#[no_mangle]
pub unsafe fn volatile_copy_memory(a: *mut u8, b: *const u8) {
// CHECK: llvm.memmove.p0i8.p0i8.{{\w*(.*true)}}
intrinsics::volatile_copy_memory(a, b, 1)
}

// CHECK-LABEL: @volatile_copy_nonoverlapping_memory
#[no_mangle]
pub unsafe fn volatile_copy_nonoverlapping_memory(a: *mut u8, b: *const u8) {
// CHECK: llvm.memcpy.p0i8.p0i8.{{\w*(.*true)}}
intrinsics::volatile_copy_nonoverlapping_memory(a, b, 1)
}

// CHECK-LABEL: @volatile_set_memory
#[no_mangle]
pub unsafe fn volatile_set_memory(a: *mut u8, b: u8) {
// CHECK: llvm.memset.p0i8.{{\w*(.*true)}}
intrinsics::volatile_set_memory(a, b, 1)
}

// CHECK-LABEL: @volatile_load
#[no_mangle]
pub unsafe fn volatile_load(a: *const u8) -> u8 {
// CHECK: load volatile
intrinsics::volatile_load(a)
}

// CHECK-LABEL: @volatile_store
#[no_mangle]
pub unsafe fn volatile_store(a: *mut u8, b: u8) {
// CHECK: store volatile
intrinsics::volatile_store(a, b)
}

// CHECK-LABEL: @unaligned_volatile_load
#[no_mangle]
pub unsafe fn unaligned_volatile_load(a: *const u8) -> u8 {
// CHECK: load volatile
intrinsics::unaligned_volatile_load(a)
}

// CHECK-LABEL: @unaligned_volatile_store
#[no_mangle]
pub unsafe fn unaligned_volatile_store(a: *mut u8, b: u8) {
// CHECK: store volatile
intrinsics::unaligned_volatile_store(a, b)
}
18 changes: 18 additions & 0 deletions src/test/codegen/intrinsics/volatile_order.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#![crate_type = "lib"]
#![feature(core_intrinsics)]

use std::intrinsics::*;

pub unsafe fn test_volatile_order() {
let mut a: Box<u8> = Box::new(0);
// CHECK: load volatile
let x = volatile_load(&*a);
// CHECK: load volatile
let x = volatile_load(&*a);
// CHECK: store volatile
volatile_store(&mut *a, 12);
// CHECK: store volatile
unaligned_volatile_store(&mut *a, 12);
// CHECK: llvm.memset.p0i8
volatile_set_memory(&mut *a, 12, 1)
}
11 changes: 11 additions & 0 deletions src/test/ui/intrinsics/intrinsic-nearby.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// run-pass
#![feature(core_intrinsics)]

use std::intrinsics::*;

fn main() {
unsafe {
assert_eq!(nearbyintf32(5.234f32), 5f32);
assert_eq!(nearbyintf64(6.777f64), 7f64);
}
}
44 changes: 44 additions & 0 deletions src/test/ui/intrinsics/intrinsic-volatile.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// run-pass

#![feature(core_intrinsics)]

use std::intrinsics::*;

pub fn main() {
unsafe {
let mut x: Box<u8> = Box::new(0);
let mut y: Box<u8> = Box::new(0);

// test volatile load
assert_eq!(volatile_load(&*x), 0);
*x = 1;
assert_eq!(volatile_load(&*x), 1);

// test volatile store
volatile_store(&mut *x, 2);
assert_eq!(*x, 2);

// test volatile copy memory
volatile_copy_memory(&mut *y, &*x, 1);
assert_eq!(*y, 2);

// test volatile copy non-overlapping memory
*x = 3;
volatile_copy_nonoverlapping_memory(&mut *y, &*x, 1);
assert_eq!(*y, 3);

// test volatile set memory
volatile_set_memory(&mut *x, 4, 1);
assert_eq!(*x, 4);

// test unaligned volatile load
let arr: [u8; 3] = [1, 2, 3];
let ptr = arr[1..].as_ptr() as *const u16;
assert_eq!(unaligned_volatile_load(ptr), u16::from_ne_bytes([arr[1], arr[2]]));

// test unaligned volatile store
let ptr = arr[1..].as_ptr() as *mut u16;
unaligned_volatile_store(ptr, 0);
assert_eq!(arr, [1, 0, 0]);
}
}