Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6fae7f8
Wrap promoted generator fields in MaybeUninit
tmandry Jul 27, 2019
b12c20c
add a pair of whitespace after remove parentheses
bravomikekilo Jul 31, 2019
e64493e
add new test and add conditional whitespace
bravomikekilo Aug 2, 2019
4c1d892
fix tidy problem
bravomikekilo Aug 2, 2019
9d4ca87
Add niche-in-generator test
tmandry Aug 3, 2019
0a1bdd4
test .await while holding variables of different sizes
alsuren Aug 4, 2019
f40190a
test drop order for parameters when a future is dropped part-way thro…
alsuren Aug 5, 2019
7c374cf
don't ignore mir_dump folder
RalfJung Aug 5, 2019
f85fc71
PlaceRef's base is already a reference
spastorino Aug 5, 2019
ef0f490
Tests around moving parts of structs and tuples across await points
gorup Aug 5, 2019
48c7346
doc: the content has since been moved to the guide
tshepang Aug 6, 2019
3a95c71
Add rustfix test and fix test name.
bravomikekilo Aug 6, 2019
3882ed4
fixup! test drop order for parameters when a future is dropped part-w…
alsuren Aug 6, 2019
c4940e0
test drop order for locals when a future is dropped part-way through …
alsuren Aug 6, 2019
c22cc1d
Remove unnecessary features from compiler error code list
Aug 6, 2019
b40788e
Fix generator size regressions due to optimization
tmandry Jul 27, 2019
fb1f57e
Rollup merge of #63034 - tmandry:reduce-generator-size-regressions, r…
Centril Aug 6, 2019
fb79a74
Rollup merge of #63163 - bravomikekilo:master, r=cramertj
Centril Aug 6, 2019
7860cf4
Rollup merge of #63294 - alsuren:async-tests, r=cramertj
Centril Aug 6, 2019
3c76ab3
Rollup merge of #63307 - RalfJung:gitignore, r=alexcrichton
Centril Aug 6, 2019
f635ce5
Rollup merge of #63308 - spastorino:place-ref-base-is-ref, r=oli-obk
Centril Aug 6, 2019
051f94d
Rollup merge of #63310 - gorup:partial-moves, r=cramertj
Centril Aug 6, 2019
2c81d60
Rollup merge of #63314 - tshepang:update-src-readme, r=matthewjasper
Centril Aug 6, 2019
c8ea26e
Rollup merge of #63333 - jethrogb:jb/error-codes-features, r=Mark-Sim…
Centril Aug 6, 2019
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 niche-in-generator test
  • Loading branch information
tmandry committed Aug 3, 2019
commit 9d4ca879b88e3a21354dcda458d7e7f7ff6370b2
17 changes: 17 additions & 0 deletions src/test/run-pass/generator/niche-in-generator.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Test that niche finding works with captured generator upvars.

#![feature(generators)]

use std::mem::size_of_val;

fn take<T>(_: T) {}

fn main() {
let x = false;
let gen1 = || {
yield;
take(x);
};

assert_eq!(size_of_val(&gen1), size_of_val(&Some(gen1)));
}