/src/test/incremental/hashes/trait_impls.rs

https://gitlab.com/rust-lang/rust · Rust · 616 lines · 447 code · 96 blank · 73 comment · 38 complexity · beb30755a1105d8c8044700fbc605c07 MD5 · raw file

  1. // This test case tests the incremental compilation hash (ICH) implementation
  2. // for let expressions.
  3. // The general pattern followed here is: Change one thing between rev1 and rev2
  4. // and make sure that the hash has changed, then change nothing between rev2 and
  5. // rev3 and make sure that the hash has not changed.
  6. // build-pass (FIXME(62277): could be check-pass?)
  7. // revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6
  8. // compile-flags: -Z query-dep-graph -O
  9. // [cfail1]compile-flags: -Zincremental-ignore-spans
  10. // [cfail2]compile-flags: -Zincremental-ignore-spans
  11. // [cfail3]compile-flags: -Zincremental-ignore-spans
  12. // [cfail4]compile-flags: -Zincremental-relative-spans
  13. // [cfail5]compile-flags: -Zincremental-relative-spans
  14. // [cfail6]compile-flags: -Zincremental-relative-spans
  15. #![allow(warnings)]
  16. #![feature(rustc_attrs)]
  17. #![feature(specialization)]
  18. #![crate_type="rlib"]
  19. struct Foo;
  20. // Change Method Name -----------------------------------------------------------
  21. #[cfg(any(cfail1,cfail4))]
  22. pub trait ChangeMethodNameTrait {
  23. fn method_name();
  24. }
  25. #[cfg(any(cfail1,cfail4))]
  26. impl ChangeMethodNameTrait for Foo {
  27. fn method_name() { }
  28. }
  29. #[cfg(not(any(cfail1,cfail4)))]
  30. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
  31. #[rustc_clean(cfg="cfail3")]
  32. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
  33. #[rustc_clean(cfg="cfail6")]
  34. pub trait ChangeMethodNameTrait {
  35. #[rustc_clean(cfg="cfail3")]
  36. #[rustc_clean(cfg="cfail6")]
  37. fn method_name2();
  38. }
  39. #[cfg(not(any(cfail1,cfail4)))]
  40. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
  41. #[rustc_clean(cfg="cfail3")]
  42. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
  43. #[rustc_clean(cfg="cfail6")]
  44. impl ChangeMethodNameTrait for Foo {
  45. #[rustc_clean(cfg="cfail3")]
  46. #[rustc_clean(cfg="cfail6")]
  47. fn method_name2() { }
  48. }
  49. // Change Method Body -----------------------------------------------------------
  50. //
  51. // This should affect the method itself, but not the impl.
  52. pub trait ChangeMethodBodyTrait {
  53. fn method_name();
  54. }
  55. #[cfg(any(cfail1,cfail4))]
  56. impl ChangeMethodBodyTrait for Foo {
  57. // ----------------------------------------------------------
  58. // -------------------------
  59. // ----------------------------------------------------------
  60. // -------------------------
  61. fn method_name() {
  62. //
  63. }
  64. }
  65. #[cfg(not(any(cfail1,cfail4)))]
  66. #[rustc_clean(cfg="cfail2")]
  67. #[rustc_clean(cfg="cfail3")]
  68. #[rustc_clean(cfg="cfail5")]
  69. #[rustc_clean(cfg="cfail6")]
  70. impl ChangeMethodBodyTrait for Foo {
  71. #[rustc_clean(except="hir_owner_nodes,typeck", cfg="cfail2")]
  72. #[rustc_clean(cfg="cfail3")]
  73. #[rustc_clean(except="hir_owner_nodes,typeck", cfg="cfail5")]
  74. #[rustc_clean(cfg="cfail6")]
  75. fn method_name() {
  76. ()
  77. }
  78. }
  79. // Change Method Body (inlined fn) ---------------------------------------------
  80. //
  81. // This should affect the method itself, but not the impl.
  82. pub trait ChangeMethodBodyTraitInlined {
  83. fn method_name();
  84. }
  85. #[cfg(any(cfail1,cfail4))]
  86. impl ChangeMethodBodyTraitInlined for Foo {
  87. // ------------------------------------------------------------------------
  88. // -------------------------
  89. // ------------------------------------------------------------------------
  90. // -------------------------
  91. #[inline]
  92. fn method_name() {
  93. // -----
  94. }
  95. }
  96. #[cfg(not(any(cfail1,cfail4)))]
  97. #[rustc_clean(cfg="cfail2")]
  98. #[rustc_clean(cfg="cfail3")]
  99. #[rustc_clean(cfg="cfail5")]
  100. #[rustc_clean(cfg="cfail6")]
  101. impl ChangeMethodBodyTraitInlined for Foo {
  102. #[rustc_clean(except="hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
  103. #[rustc_clean(cfg="cfail3")]
  104. #[rustc_clean(except="hir_owner_nodes,typeck,optimized_mir", cfg="cfail5")]
  105. #[rustc_clean(cfg="cfail6")]
  106. #[inline]
  107. fn method_name() {
  108. panic!()
  109. }
  110. }
  111. // Change Method Selfness ------------------------------------------------------
  112. #[cfg(any(cfail1,cfail4))]
  113. pub trait ChangeMethodSelfnessTrait {
  114. fn method_name();
  115. }
  116. #[cfg(any(cfail1,cfail4))]
  117. impl ChangeMethodSelfnessTrait for Foo {
  118. fn method_name() { }
  119. }
  120. #[cfg(not(any(cfail1,cfail4)))]
  121. pub trait ChangeMethodSelfnessTrait {
  122. fn method_name(&self);
  123. }
  124. #[cfg(not(any(cfail1,cfail4)))]
  125. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
  126. #[rustc_clean(cfg="cfail3")]
  127. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
  128. #[rustc_clean(cfg="cfail6")]
  129. impl ChangeMethodSelfnessTrait for Foo {
  130. #[rustc_clean(
  131. except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
  132. cfg="cfail2",
  133. )]
  134. #[rustc_clean(cfg="cfail3")]
  135. #[rustc_clean(
  136. except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
  137. cfg="cfail5",
  138. )]
  139. #[rustc_clean(cfg="cfail6")]
  140. fn method_name(&self) {
  141. ()
  142. }
  143. }
  144. // Change Method Selfness -----------------------------------------------------------
  145. #[cfg(any(cfail1,cfail4))]
  146. pub trait RemoveMethodSelfnessTrait {
  147. fn method_name(&self);
  148. }
  149. #[cfg(any(cfail1,cfail4))]
  150. impl RemoveMethodSelfnessTrait for Foo {
  151. fn method_name(&self) { }
  152. }
  153. #[cfg(not(any(cfail1,cfail4)))]
  154. pub trait RemoveMethodSelfnessTrait {
  155. fn method_name();
  156. }
  157. #[cfg(not(any(cfail1,cfail4)))]
  158. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
  159. #[rustc_clean(cfg="cfail3")]
  160. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
  161. #[rustc_clean(cfg="cfail6")]
  162. impl RemoveMethodSelfnessTrait for Foo {
  163. #[rustc_clean(
  164. except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
  165. cfg="cfail2",
  166. )]
  167. #[rustc_clean(cfg="cfail3")]
  168. #[rustc_clean(
  169. except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
  170. cfg="cfail5",
  171. )]
  172. #[rustc_clean(cfg="cfail6")]
  173. fn method_name() {}
  174. }
  175. // Change Method Selfmutness -----------------------------------------------------------
  176. #[cfg(any(cfail1,cfail4))]
  177. pub trait ChangeMethodSelfmutnessTrait {
  178. fn method_name(&self);
  179. }
  180. #[cfg(any(cfail1,cfail4))]
  181. impl ChangeMethodSelfmutnessTrait for Foo {
  182. // -----------------------------------------------------------------------------------------
  183. // -------------------------
  184. // -----------------------------------------------------------------------------------------
  185. // -------------------------
  186. fn method_name(& self) {}
  187. }
  188. #[cfg(not(any(cfail1,cfail4)))]
  189. pub trait ChangeMethodSelfmutnessTrait {
  190. fn method_name(&mut self);
  191. }
  192. #[cfg(not(any(cfail1,cfail4)))]
  193. #[rustc_clean(cfg="cfail2")]
  194. #[rustc_clean(cfg="cfail3")]
  195. #[rustc_clean(cfg="cfail5")]
  196. #[rustc_clean(cfg="cfail6")]
  197. impl ChangeMethodSelfmutnessTrait for Foo {
  198. #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
  199. #[rustc_clean(cfg="cfail3")]
  200. #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail5")]
  201. #[rustc_clean(cfg="cfail6")]
  202. fn method_name(&mut self) {}
  203. }
  204. // Change item kind -----------------------------------------------------------
  205. #[cfg(any(cfail1,cfail4))]
  206. pub trait ChangeItemKindTrait {
  207. fn name();
  208. }
  209. #[cfg(any(cfail1,cfail4))]
  210. impl ChangeItemKindTrait for Foo {
  211. fn name() { }
  212. }
  213. #[cfg(not(any(cfail1,cfail4)))]
  214. pub trait ChangeItemKindTrait {
  215. type name;
  216. }
  217. #[cfg(not(any(cfail1,cfail4)))]
  218. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
  219. #[rustc_clean(cfg="cfail3")]
  220. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
  221. #[rustc_clean(cfg="cfail6")]
  222. impl ChangeItemKindTrait for Foo {
  223. type name = ();
  224. }
  225. // Remove item -----------------------------------------------------------
  226. #[cfg(any(cfail1,cfail4))]
  227. pub trait RemoveItemTrait {
  228. type TypeName;
  229. fn method_name();
  230. }
  231. #[cfg(any(cfail1,cfail4))]
  232. impl RemoveItemTrait for Foo {
  233. type TypeName = ();
  234. fn method_name() { }
  235. }
  236. #[cfg(not(any(cfail1,cfail4)))]
  237. pub trait RemoveItemTrait {
  238. type TypeName;
  239. }
  240. #[cfg(not(any(cfail1,cfail4)))]
  241. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
  242. #[rustc_clean(cfg="cfail3")]
  243. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
  244. #[rustc_clean(cfg="cfail6")]
  245. impl RemoveItemTrait for Foo {
  246. type TypeName = ();
  247. }
  248. // Add item -----------------------------------------------------------
  249. #[cfg(any(cfail1,cfail4))]
  250. pub trait AddItemTrait {
  251. type TypeName;
  252. }
  253. #[cfg(any(cfail1,cfail4))]
  254. impl AddItemTrait for Foo {
  255. type TypeName = ();
  256. }
  257. #[cfg(not(any(cfail1,cfail4)))]
  258. pub trait AddItemTrait {
  259. type TypeName;
  260. fn method_name();
  261. }
  262. #[cfg(not(any(cfail1,cfail4)))]
  263. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
  264. #[rustc_clean(cfg="cfail3")]
  265. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
  266. #[rustc_clean(cfg="cfail6")]
  267. impl AddItemTrait for Foo {
  268. type TypeName = ();
  269. fn method_name() { }
  270. }
  271. // Change has-value -----------------------------------------------------------
  272. #[cfg(any(cfail1,cfail4))]
  273. pub trait ChangeHasValueTrait {
  274. fn method_name();
  275. }
  276. #[cfg(any(cfail1,cfail4))]
  277. impl ChangeHasValueTrait for Foo {
  278. fn method_name() { }
  279. }
  280. #[cfg(not(any(cfail1,cfail4)))]
  281. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
  282. #[rustc_clean(cfg="cfail3")]
  283. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
  284. #[rustc_clean(cfg="cfail6")]
  285. pub trait ChangeHasValueTrait {
  286. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail2")]
  287. #[rustc_clean(cfg="cfail3")]
  288. #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail5")]
  289. #[rustc_clean(cfg="cfail6")]
  290. fn method_name() { }
  291. }
  292. #[cfg(not(any(cfail1,cfail4)))]
  293. #[rustc_clean(cfg="cfail2")]
  294. #[rustc_clean(cfg="cfail3")]
  295. #[rustc_clean(cfg="cfail5")]
  296. #[rustc_clean(cfg="cfail6")]
  297. impl ChangeHasValueTrait for Foo {
  298. fn method_name() { }
  299. }
  300. // Add default
  301. pub trait AddDefaultTrait {
  302. fn method_name();
  303. }
  304. #[cfg(any(cfail1,cfail4))]
  305. impl AddDefaultTrait for Foo {
  306. // ----------------------------------------------------
  307. // -------------------------
  308. // ----------------------------------------------------
  309. // -------------------------
  310. fn method_name() { }
  311. }
  312. #[cfg(not(any(cfail1,cfail4)))]
  313. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
  314. #[rustc_clean(cfg="cfail3")]
  315. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
  316. #[rustc_clean(cfg="cfail6")]
  317. impl AddDefaultTrait for Foo {
  318. #[rustc_clean(except="associated_item", cfg="cfail2")]
  319. #[rustc_clean(cfg="cfail3")]
  320. #[rustc_clean(except="associated_item", cfg="cfail5")]
  321. #[rustc_clean(cfg="cfail6")]
  322. default fn method_name() { }
  323. }
  324. // Add arguments
  325. #[cfg(any(cfail1,cfail4))]
  326. pub trait AddArgumentTrait {
  327. fn method_name(&self);
  328. }
  329. #[cfg(any(cfail1,cfail4))]
  330. impl AddArgumentTrait for Foo {
  331. // -----------------------------------------------------------------------------------------
  332. // -------------------------
  333. // -----------------------------------------------------------------------------------------
  334. // -------------------------
  335. fn method_name(&self ) { }
  336. }
  337. #[cfg(not(any(cfail1,cfail4)))]
  338. pub trait AddArgumentTrait {
  339. fn method_name(&self, x: u32);
  340. }
  341. #[cfg(not(any(cfail1,cfail4)))]
  342. #[rustc_clean(cfg="cfail2")]
  343. #[rustc_clean(cfg="cfail3")]
  344. #[rustc_clean(cfg="cfail5")]
  345. #[rustc_clean(cfg="cfail6")]
  346. impl AddArgumentTrait for Foo {
  347. #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
  348. #[rustc_clean(cfg="cfail3")]
  349. #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail5")]
  350. #[rustc_clean(cfg="cfail6")]
  351. fn method_name(&self, _x: u32) { }
  352. }
  353. // Change argument type
  354. #[cfg(any(cfail1,cfail4))]
  355. pub trait ChangeArgumentTypeTrait {
  356. fn method_name(&self, x: u32);
  357. }
  358. #[cfg(any(cfail1,cfail4))]
  359. impl ChangeArgumentTypeTrait for Foo {
  360. // -----------------------------------------------------------------------------------------
  361. // -------------------------
  362. // -----------------------------------------------------------------------------------------
  363. // -------------------------
  364. fn method_name(&self, _x: u32 ) { }
  365. }
  366. #[cfg(not(any(cfail1,cfail4)))]
  367. pub trait ChangeArgumentTypeTrait {
  368. fn method_name(&self, x: char);
  369. }
  370. #[cfg(not(any(cfail1,cfail4)))]
  371. #[rustc_clean(cfg="cfail2")]
  372. #[rustc_clean(cfg="cfail3")]
  373. #[rustc_clean(cfg="cfail5")]
  374. #[rustc_clean(cfg="cfail6")]
  375. impl ChangeArgumentTypeTrait for Foo {
  376. #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
  377. #[rustc_clean(cfg="cfail3")]
  378. #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail5")]
  379. #[rustc_clean(cfg="cfail6")]
  380. fn method_name(&self, _x: char) { }
  381. }
  382. struct Bar<T>(T);
  383. // Add Type Parameter To Impl --------------------------------------------------
  384. trait AddTypeParameterToImpl<T> {
  385. fn id(t: T) -> T;
  386. }
  387. #[cfg(any(cfail1,cfail4))]
  388. impl AddTypeParameterToImpl<u32> for Bar<u32> {
  389. fn id(t: u32) -> u32 { t }
  390. }
  391. #[cfg(not(any(cfail1,cfail4)))]
  392. #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,impl_trait_ref", cfg="cfail2")]
  393. #[rustc_clean(cfg="cfail3")]
  394. #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,impl_trait_ref", cfg="cfail5")]
  395. #[rustc_clean(cfg="cfail6")]
  396. impl<TTT> AddTypeParameterToImpl<TTT> for Bar<TTT> {
  397. #[rustc_clean(
  398. except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir",
  399. cfg="cfail2",
  400. )]
  401. #[rustc_clean(cfg="cfail3")]
  402. #[rustc_clean(
  403. except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir",
  404. cfg="cfail5",
  405. )]
  406. #[rustc_clean(cfg="cfail6")]
  407. fn id(t: TTT) -> TTT { t }
  408. }
  409. // Change Self Type of Impl ----------------------------------------------------
  410. trait ChangeSelfTypeOfImpl {
  411. fn id(self) -> Self;
  412. }
  413. #[cfg(any(cfail1,cfail4))]
  414. impl ChangeSelfTypeOfImpl for u32 {
  415. fn id(self) -> Self { self }
  416. }
  417. #[cfg(not(any(cfail1,cfail4)))]
  418. #[rustc_clean(except="hir_owner,hir_owner_nodes,impl_trait_ref", cfg="cfail2")]
  419. #[rustc_clean(cfg="cfail3")]
  420. #[rustc_clean(except="hir_owner,hir_owner_nodes,impl_trait_ref", cfg="cfail5")]
  421. #[rustc_clean(cfg="cfail6")]
  422. impl ChangeSelfTypeOfImpl for u64 {
  423. #[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail2")]
  424. #[rustc_clean(cfg="cfail3")]
  425. #[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail5")]
  426. #[rustc_clean(cfg="cfail6")]
  427. fn id(self) -> Self { self }
  428. }
  429. // Add Lifetime Bound to Impl --------------------------------------------------
  430. trait AddLifetimeBoundToImplParameter {
  431. fn id(self) -> Self;
  432. }
  433. #[cfg(any(cfail1,cfail4))]
  434. impl<T> AddLifetimeBoundToImplParameter for T {
  435. fn id(self) -> Self { self }
  436. }
  437. #[cfg(not(any(cfail1,cfail4)))]
  438. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
  439. #[rustc_clean(cfg="cfail3")]
  440. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
  441. #[rustc_clean(cfg="cfail6")]
  442. impl<T: 'static> AddLifetimeBoundToImplParameter for T {
  443. #[rustc_clean(cfg="cfail2")]
  444. #[rustc_clean(cfg="cfail3")]
  445. #[rustc_clean(cfg="cfail5")]
  446. #[rustc_clean(cfg="cfail6")]
  447. fn id(self) -> Self { self }
  448. }
  449. // Add Trait Bound to Impl Parameter -------------------------------------------
  450. trait AddTraitBoundToImplParameter {
  451. fn id(self) -> Self;
  452. }
  453. #[cfg(any(cfail1,cfail4))]
  454. impl<T> AddTraitBoundToImplParameter for T {
  455. fn id(self) -> Self { self }
  456. }
  457. #[cfg(not(any(cfail1,cfail4)))]
  458. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
  459. #[rustc_clean(cfg="cfail3")]
  460. #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
  461. #[rustc_clean(cfg="cfail6")]
  462. impl<T: Clone> AddTraitBoundToImplParameter for T {
  463. #[rustc_clean(cfg="cfail2")]
  464. #[rustc_clean(cfg="cfail3")]
  465. #[rustc_clean(cfg="cfail5")]
  466. #[rustc_clean(cfg="cfail6")]
  467. fn id(self) -> Self { self }
  468. }
  469. // Add #[no_mangle] to Method --------------------------------------------------
  470. trait AddNoMangleToMethod {
  471. fn add_no_mangle_to_method(&self) { }
  472. }
  473. #[cfg(any(cfail1,cfail4))]
  474. impl AddNoMangleToMethod for Foo {
  475. // -------------------------
  476. // -------------------------
  477. // -------------------------
  478. // -------------------------
  479. // ---------
  480. fn add_no_mangle_to_method(&self) { }
  481. }
  482. #[cfg(not(any(cfail1,cfail4)))]
  483. #[rustc_clean(cfg="cfail2")]
  484. #[rustc_clean(cfg="cfail3")]
  485. #[rustc_clean(cfg="cfail5")]
  486. #[rustc_clean(cfg="cfail6")]
  487. impl AddNoMangleToMethod for Foo {
  488. #[rustc_clean(cfg="cfail2")]
  489. #[rustc_clean(cfg="cfail3")]
  490. #[rustc_clean(cfg="cfail5")]
  491. #[rustc_clean(cfg="cfail6")]
  492. #[no_mangle]
  493. fn add_no_mangle_to_method(&self) { }
  494. }
  495. // Make Method #[inline] -------------------------------------------------------
  496. trait MakeMethodInline {
  497. fn make_method_inline(&self) -> u8 { 0 }
  498. }
  499. #[cfg(any(cfail1,cfail4))]
  500. impl MakeMethodInline for Foo {
  501. // -------------------------
  502. // -------------------------
  503. // -------------------------
  504. // -------------------------
  505. // ------
  506. fn make_method_inline(&self) -> u8 { 0 }
  507. }
  508. #[cfg(not(any(cfail1,cfail4)))]
  509. #[rustc_clean(cfg="cfail2")]
  510. #[rustc_clean(cfg="cfail3")]
  511. #[rustc_clean(cfg="cfail5")]
  512. #[rustc_clean(cfg="cfail6")]
  513. impl MakeMethodInline for Foo {
  514. #[rustc_clean(cfg="cfail2")]
  515. #[rustc_clean(cfg="cfail3")]
  516. #[rustc_clean(cfg="cfail5")]
  517. #[rustc_clean(cfg="cfail6")]
  518. #[inline]
  519. fn make_method_inline(&self) -> u8 { 0 }
  520. }