{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/42843","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/42843/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/42843/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/42843/events","html_url":"https://github.com/rust-lang/rust/issues/42843","id":237991118,"number":42843,"title":"Rust 1.20 regression, rstored","user":{"login":"brson","id":147214,"avatar_url":"https://avatars3.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"labels":[{"id":147085028,"url":"https://api.github.com/repos/rust-lang/rust/labels/regression-from-stable-to-nightly","name":"regression-from-stable-to-nightly","color":"FF309F","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-22T22:24:44Z","updated_at":"2017-06-23T06:58:05Z","closed_at":null,"body":"https://github.com/artur-augustyniak/rstored\r\n\r\n```\r\nbrian@ip-10-145-43-250:/mnt2/dev/rstored⟫ git log -1\r\ncommit c0032b5061cbacd2c5fec894b8b4dc718a2975c3\r\nAuthor: Artur Augustyniak <artur@aaugustyniak.pl>\r\nDate:   Sat May 13 13:39:25 2017 +0200\r\n\r\n    todo up\r\n```\r\n\r\n```\r\nbrian@ip-10-145-43-250:/mnt2/dev/euclid⟫ rustc +nightly -Vv\r\nrustc 1.20.0-nightly (622e7e648 2017-06-21)\r\nbinary: rustc\r\ncommit-hash: 622e7e6487b6fb7fdbb901720cd4214f9179ed67\r\ncommit-date: 2017-06-21\r\nhost: x86_64-unknown-linux-gnu\r\nrelease: 1.20.0-nightly\r\nLLVM version: 4.0\r\n```\r\n\r\n```\r\nbrian@ip-10-145-43-250:/mnt2/dev/rstored⟫ cargo +nightly test\r\n    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs\r\n     Running target/debug/deps/rstored-c51de7b5c16d0250\r\n\r\nrunning 2 tests\r\ntest logging::logger::tests::test_stdout_match ... ok\r\ntest logging::logger::tests::test_syslog_match ... FAILED\r\n\r\nfailures:\r\n\r\n---- logging::logger::tests::test_syslog_match stdout ----\r\n        syslog_log(1, foo)\r\nthread 'logging::logger::tests::test_syslog_match' panicked at 'assertion failed: `(left == right)` (left: `2`, right: `1`)', src/logging/logger.rs:141\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n\r\n\r\nfailures:\r\n    logging::logger::tests::test_syslog_match\r\n\r\ntest result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out\r\n\r\nerror: test failed, to rerun pass '--bin rstored'\r\n```\r\n\r\ncc @artur-augustyniak\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/310587900","html_url":"https://github.com/rust-lang/rust/issues/42843#issuecomment-310587900","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/42843","id":310587900,"user":{"login":"artur-augustyniak","id":4763087,"avatar_url":"https://avatars3.githubusercontent.com/u/4763087?v=3","gravatar_id":"","url":"https://api.github.com/users/artur-augustyniak","html_url":"https://github.com/artur-augustyniak","followers_url":"https://api.github.com/users/artur-augustyniak/followers","following_url":"https://api.github.com/users/artur-augustyniak/following{/other_user}","gists_url":"https://api.github.com/users/artur-augustyniak/gists{/gist_id}","starred_url":"https://api.github.com/users/artur-augustyniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artur-augustyniak/subscriptions","organizations_url":"https://api.github.com/users/artur-augustyniak/orgs","repos_url":"https://api.github.com/users/artur-augustyniak/repos","events_url":"https://api.github.com/users/artur-augustyniak/events{/privacy}","received_events_url":"https://api.github.com/users/artur-augustyniak/received_events","type":"User","site_admin":false},"created_at":"2017-06-23T06:58:05Z","updated_at":"2017-06-23T06:58:05Z","body":"Hi, first of all this test is a real mess. While learning Rust it was an attempt to simulate C derived testing technique, when you replace some non testable code using preprocessor include directive.\r\nI did not know that test functions are run in parallel by default (found RUST_TEST_THREADS=1 right now).\r\nBut for clarity, transmuting global data was an attempt to get enum ordinal (to check exact function used via its side effect):\r\n\r\n```\r\nenum Foo{\r\n   Bar,\r\n   Baz\r\n}\r\n\r\n\r\nuse std::mem;\r\n\r\nfn main() {\r\n    unsafe{\r\n        let ordinal1: u8 = mem::transmute(Foo::Bar);\r\n        let ordinal2: u8 = mem::transmute(Foo::Baz);\r\n        println!(\"{} {}\", ordinal1, ordinal2);\r\n    }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"artur-augustyniak"}}