diff --git a/.mailmap b/.mailmap index c1a605bd94c9d..0f06604fa534b 100644 --- a/.mailmap +++ b/.mailmap @@ -10,11 +10,14 @@ Abhishek Chanda Abhishek Chanda Aydin Kim aydin.kim Alex Lyon +Alex Newman Alex HotShot Newman Alex Rønne Petersen Andreas Gal +Andrew Kuchev <0coming.soon@gmail.com> Andrew <0coming.soon@gmail.com> Andrew Poelstra Anton Löfgren -Ariel Ben-Yehuda arielb1 +Ariel Ben-Yehuda arielb1 +Ariel Ben-Yehuda Ariel Ben-Yehuda Austin Seipp Ben Alpert Benjamin Jackman @@ -76,6 +79,7 @@ Kang Seonghoon Keegan McAllister Kyeongwoon Lee Lee Wondong +Lee Jeffery Lee Jeffery Lennart Kudling Lindsey Kuper Lindsey Kuper @@ -121,8 +125,10 @@ startling Steven Fackler Steven Stewart-Gallus Tamir Duberstein Tamir Duberstein +Ticki Ticki <@> Tim Chevalier Torsten Weber +Ulrik Sverdrup Ulrik Sverdrup Vadim Petrochenkov petrochenkov William Ting Xuefeng Wu Xuefeng Wu XuefengWu diff --git a/AUTHORS.txt b/AUTHORS.txt index 60e1a34aecb4d..310a91b2d16fd 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -10,6 +10,7 @@ Aaron Turon Aaron Weiss Abhishek Chanda Adam Bozanich +Adam Heins Adam Jacob Adam Roben Adam Szkoda @@ -17,6 +18,7 @@ Adenilson Cavalcanti Adolfo Ochagavía Adrien Brault Adrien Tétar +Agoston Szepessy Ahmed Charles Aidan Cully Aidan Hobson Sayers @@ -44,6 +46,7 @@ Alexei Sholik Alex Gaynor Alexis Beingessner Alex Lyon +Alex Newman Alex Quach Alex Rønne Petersen Alex Stokes @@ -73,15 +76,19 @@ Andrew Foote Andrew Gallant Andrew Hobden Andrew Kensler +Andrew Kuchev <0coming.soon@gmail.com> Andrew Paseltiner Andrew Poelstra Andrew Seidl Andrew Straw Andrew Wagner Andrzej Janik +Andy Caldwell +Andy Grover Angus Lees Anthony Juckel Anton Löfgren +Antti Keränen Aram Visser Arcterus Areski Belaid @@ -93,6 +100,7 @@ Armin Ronacher Arpad Borsos Artem Arthur Liao +arthurprs arturo Ashok Gautham Augusto Hack @@ -134,6 +142,7 @@ Bill Wendling Birunthan Mohanathas Björn Steinbrink blake2-ppc +Blake Loring bluss bluss Boris Egorov @@ -158,6 +167,7 @@ Brian J. Burg Brian Koropoff Brian Leibig Brian Quinlan +Brody Holden Bruno de Oliveira Abinader Bryan Dunsmore Byron Williams @@ -189,7 +199,9 @@ Chris Pressey Chris Sainty Chris Shea Chris Thorn +Christian Persson Christian Stadelmann +Christian Weinz Christoph Burgdorf Christopher Bergqvist Christopher Chambers @@ -228,6 +240,7 @@ Dan Albert Dan Burkert Dan Callahan Dan Connolly +Daniel Albert Daniel Brooks Daniel Fagnan Daniel Farina @@ -278,6 +291,7 @@ Derek Chiang Derek Guenther Derek Harland dgoon +diaphore Diego Giagio Diego Ongaro Diggory Blake @@ -285,6 +299,7 @@ Diggory Hardy Dimitri Krassovski Dirk Gadsden Dirkjan Bussink +Dirkjan Ochtman Dirk Leifeld Div Shekhar diwic @@ -319,6 +334,7 @@ Ehsanul Hoque Elantsev Serj Eli Friedman eliovir +Eljay Elliott Slaughter Elly Fong-Jones elszben @@ -343,6 +359,8 @@ Erik Michaels-Ober Erik Price Erik Rose Erwan +Esption +eternaleye Etienne Millon Eunchong Yu Eunji Jeong @@ -371,6 +389,7 @@ fort Francisco Souza frankamp Franklin Chen +Frank McSherry Franziska Hinkelmann free-Runner FuGangqiang @@ -392,6 +411,7 @@ Geoff Hill Geoffrey Thomas Geoffroy Couprie Geoffry Song +Georg Brandl George Papanikolaou Georges Dubus Germano Gabbianelli @@ -478,6 +498,7 @@ Jan Andersson Jan Bujak Jan-Erik Rediger Jan Kobler +Jan Likar Jan Niklas Hasse Jannis Harder Jannis Redmann @@ -486,6 +507,7 @@ Jarod Liu Jashank Jeremy Jason Fager Jason Orendorff +Jason Schein Jason Thompson Jason Toffaletti Jason Yeo @@ -499,6 +521,7 @@ J.C. Moyer Jeaye Jed Davis Jed Estep +Jeehoon Kang Jeff Balogh Jeff Belgum Jeff Muizelaar @@ -515,6 +538,8 @@ Jesse Luehrs Jesse Ray Jesse Ruderman Jessy Diamond Exum +Jesús Espino +jethrogb Jexell Jihyeok Seo Jihyun Yu @@ -556,6 +581,7 @@ joliv Jonas Hietala Jonathan Bailey Jonathan Boyett +Jonathan Hansford Jonathan Reem Jonathan S Jonathan Sternberg @@ -571,6 +597,7 @@ Jorge Aparicio Jorge Israel Peña Joris Rehm Jormundir +Jose Narvaez Joseph Crail Joseph Martin Joseph Rushton Wakeling @@ -595,6 +622,7 @@ Justin Noah juxiliary jxv Jyun-Yan You +Kagami Sascha Rosylight Kang Seonghoon Kasey Carrothers Keegan McAllister @@ -613,13 +641,17 @@ Kevin Rauwolf Kevin Walter Kevin Yap kgv +Kieran Hunt Kiet Tran Kim Røen kjpgit klutzy KokaKiwi korenchkin +Kornel Lesiński Kostas Karachalios +Kristof Söderström +krumelmonster Krzysztof Drewniak Kubilay Kocak kulakowski @@ -635,6 +667,7 @@ Leah Hanson Lee Aronson Lee Jeffery Lee Wondong +Leif Arne Storset LemmingAvalanche Lennart Kudling Leo Correa @@ -664,6 +697,7 @@ madmalik Magnus Auvinen Mahmut Bulut maikklein +Makoto Kato Makoto Nakashima Manish Goregaokar Manuel Hoffmann @@ -675,6 +709,7 @@ Margaret Meyerhofer Marijn Haverbeke Marin Atanasov Nikolov Mário Feroldi +Mark Buer Mark Lacey <641@rudkx.com> Mark Mossberg Mark Rowe @@ -699,6 +734,7 @@ Matt Brubeck Matt Carberry Matt Coffin Matt Cox +Matt Friedman Matthew Astley Matthew Auld Matthew Iselin @@ -753,6 +789,7 @@ Mickaël Delahaye Mickaël Raybaud-Roig Mickaël Salaün Mick Koch +midinastasurazz Mihnea Dobrescu-Balaur Mike Boutin Mike Dilger @@ -762,6 +799,7 @@ Mike Robinson Mike Sampson Mikhail Zabaluev Mikko Perttunen +mitaa mitchmindtree Mohammed Attia moonglum @@ -795,6 +833,7 @@ Nick Howell Nick Platt Nick Sarten Nicolas Silva +Nicolette Verlinden Niels Egberts Niels langager Ellegaard Nif Ward @@ -814,7 +853,6 @@ Oak OGINO Masanori OlegTsyba Oliver Schneider -Oliver Schneider Olivier Saut olivren Olle Jonsson @@ -849,6 +887,7 @@ Paul Quint Paul Stansifer Paul Woolcock Pavel Panchekha +Pavel Pravosud Pawel Olzacki Pedro Larroy Peer Aramillo Irizar @@ -885,6 +924,7 @@ Q.P.Liu qwitwa Rafael Ávila de Espíndola Rahul Horé +Ralf Jung Ralph Bodenner Ralph Giles Ramkumar Ramachandra @@ -940,6 +980,7 @@ Russell McClellan Ruud van Asseldonk Ryan Levick Ryan Mulligan +Ryan Pendleton Ryan Prichard Ryan Riginding Ryan Scheel @@ -1024,6 +1065,7 @@ Subhash Bhushan sumito3478 Swaroop C H Sylvestre Ledru +Taliesin Beynon Tamir Duberstein Tamir Duberstein Taras Shpot @@ -1045,6 +1087,7 @@ Thomas Jespersen Thomas Karpiniec Tiago Nobrega Tibor Benke +Ticki Till Hoeppner Tim Brooks Tim Chevalier @@ -1086,7 +1129,7 @@ Tyler Bindon Tyler Thrailkill tynopex Ty Overby -Ulrik Sverdrup +Ulrik Sverdrup Ulysse Carion User Jyyou Utkarsh Kukreti @@ -1102,6 +1145,7 @@ Vijay Korapaty Viktor Dahl ville-h Vincent Belliard +Vincent Bernat Vinzent Steinberg Virgile Andreani visualfc @@ -1109,6 +1153,7 @@ Vitali Haravy Vivek Galatage Vladimir Matveev Vladimir Pouzanov +Vladimir Rutsky Vladimir Smola Vojtech Kral Volker Mische @@ -1125,6 +1170,7 @@ Wilfred Hughes Will Andrews Will Engler Will Hipschman +William Throwe William Ting Willson Mock Will diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index f74bb9ee89ad0..c5db7cd718b8e 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -596,8 +596,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "Force drop flag checks on or off"), trace_macros: bool = (false, parse_bool, "For every macro invocation, print its name and arguments"), - disable_nonzeroing_move_hints: bool = (false, parse_bool, - "Force nonzeroing move optimization off"), + enable_nonzeroing_move_hints: bool = (false, parse_bool, + "Force nonzeroing move optimization on"), } pub fn default_lib_output() -> CrateType { diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index efd46d35f56b7..99a58f07ae62b 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -273,7 +273,7 @@ impl Session { self.opts.debugging_opts.print_enum_sizes } pub fn nonzeroing_move_hints(&self) -> bool { - !self.opts.debugging_opts.disable_nonzeroing_move_hints + self.opts.debugging_opts.enable_nonzeroing_move_hints } pub fn sysroot<'a>(&'a self) -> &'a Path { match self.opts.maybe_sysroot { diff --git a/src/test/run-pass/issue-27401-dropflag-reinit.rs b/src/test/run-pass/issue-27401-dropflag-reinit.rs new file mode 100644 index 0000000000000..ab8f22e78be72 --- /dev/null +++ b/src/test/run-pass/issue-27401-dropflag-reinit.rs @@ -0,0 +1,36 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-pretty #27582 + +// Check that when a `let`-binding occurs in a loop, its associated +// drop-flag is reinitialized (to indicate "needs-drop" at the end of +// the owning variable's scope). + +struct A<'a>(&'a mut i32); + +impl<'a> Drop for A<'a> { + fn drop(&mut self) { + *self.0 += 1; + } +} + +fn main() { + let mut cnt = 0; + for i in 0..2 { + let a = A(&mut cnt); + if i == 1 { // Note that + break; // both this break + } // and also + drop(a); // this move of `a` + // are necessary to expose the bug + } + assert_eq!(cnt, 2); +}