diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-07-11 00:19:23 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-07-11 00:22:08 -0700 |
| commit | 11c63eaad2311bbeea67ec9a9300686dbe400e23 (patch) | |
| tree | 9325b088dee7d55e9dfe0cc709eb0460e0d17fd9 /src/libstd/local_data.rs | |
| parent | e3fb7062aa2d7113c4ff4cb41a27bfb637465d57 (diff) | |
| download | rust-11c63eaad2311bbeea67ec9a9300686dbe400e23.tar.gz rust-11c63eaad2311bbeea67ec9a9300686dbe400e23.zip | |
Fix a soundness problem with `get`
Diffstat (limited to 'src/libstd/local_data.rs')
| -rw-r--r-- | src/libstd/local_data.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs index a117d461cfd..711ed15fa9d 100644 --- a/src/libstd/local_data.rs +++ b/src/libstd/local_data.rs @@ -273,3 +273,11 @@ fn test_static_pointer() { set(key, @&VALUE); } } + +#[test] +fn test_owned() { + unsafe { + fn key(_x: ~int) { } + set(key, ~1); + } +} |
