]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #47843 - estebank:teach, r=nikomatsakis
authorbors <bors@rust-lang.org>
Mon, 12 Feb 2018 09:38:40 +0000 (09:38 +0000)
committerbors <bors@rust-lang.org>
Mon, 12 Feb 2018 09:38:40 +0000 (09:38 +0000)
Add `-Zteach` documentation

Add extra inline documentation to E0019, E0016, E0013, E0396, E0017,
E0018, E0010, E0022, E0030, E0029, E0033, E0026 and E0027.

Follow up to #47652.

721 files changed:
src/librustc/middle/entry.rs
src/librustc_mir/transform/qualify_consts.rs
src/librustc_passes/consts.rs
src/librustc_typeck/check/_match.rs
src/test/compile-fail/E0001.rs [deleted file]
src/test/compile-fail/E0004-2.rs [deleted file]
src/test/compile-fail/E0004.rs [deleted file]
src/test/compile-fail/E0005.rs [deleted file]
src/test/compile-fail/E0007.rs [deleted file]
src/test/compile-fail/E0008.rs [deleted file]
src/test/compile-fail/E0009.rs [deleted file]
src/test/compile-fail/E0010.rs [deleted file]
src/test/compile-fail/E0017.rs [deleted file]
src/test/compile-fail/E0023.rs [deleted file]
src/test/compile-fail/E0025.rs [deleted file]
src/test/compile-fail/E0026.rs [deleted file]
src/test/compile-fail/E0027.rs [deleted file]
src/test/compile-fail/E0029.rs [deleted file]
src/test/compile-fail/E0030.rs [deleted file]
src/test/compile-fail/E0033.rs [deleted file]
src/test/compile-fail/E0034.rs [deleted file]
src/test/compile-fail/E0038.rs [deleted file]
src/test/compile-fail/E0040.rs [deleted file]
src/test/compile-fail/E0044.rs [deleted file]
src/test/compile-fail/E0045.rs [deleted file]
src/test/compile-fail/E0049.rs [deleted file]
src/test/compile-fail/E0050.rs [deleted file]
src/test/compile-fail/E0054.rs [deleted file]
src/test/compile-fail/E0055.rs [deleted file]
src/test/compile-fail/E0057.rs [deleted file]
src/test/compile-fail/E0059.rs [deleted file]
src/test/compile-fail/E0060.rs [deleted file]
src/test/compile-fail/E0061.rs [deleted file]
src/test/compile-fail/E0062.rs [deleted file]
src/test/compile-fail/E0063.rs [deleted file]
src/test/compile-fail/E0067.rs [deleted file]
src/test/compile-fail/E0069.rs [deleted file]
src/test/compile-fail/E0070.rs [deleted file]
src/test/compile-fail/E0071.rs [deleted file]
src/test/compile-fail/E0075.rs [deleted file]
src/test/compile-fail/E0076.rs [deleted file]
src/test/compile-fail/E0077.rs [deleted file]
src/test/compile-fail/E0080.rs [deleted file]
src/test/compile-fail/E0081.rs [deleted file]
src/test/compile-fail/E0084.rs [deleted file]
src/test/compile-fail/E0087.rs [deleted file]
src/test/compile-fail/E0088.rs [deleted file]
src/test/compile-fail/E0089.rs [deleted file]
src/test/compile-fail/E0090.rs [deleted file]
src/test/compile-fail/E0091.rs [deleted file]
src/test/compile-fail/E0092.rs [deleted file]
src/test/compile-fail/E0093.rs [deleted file]
src/test/compile-fail/E0094.rs [deleted file]
src/test/compile-fail/E0106.rs [deleted file]
src/test/compile-fail/E0107.rs [deleted file]
src/test/compile-fail/E0109.rs [deleted file]
src/test/compile-fail/E0110.rs [deleted file]
src/test/compile-fail/E0116.rs [deleted file]
src/test/compile-fail/E0117.rs [deleted file]
src/test/compile-fail/E0118.rs [deleted file]
src/test/compile-fail/E0119.rs [deleted file]
src/test/compile-fail/E0120.rs [deleted file]
src/test/compile-fail/E0121.rs [deleted file]
src/test/compile-fail/E0124.rs [deleted file]
src/test/compile-fail/E0128.rs [deleted file]
src/test/compile-fail/E0130.rs [deleted file]
src/test/compile-fail/E0131.rs [deleted file]
src/test/compile-fail/E0132.rs [deleted file]
src/test/compile-fail/E0133.rs [deleted file]
src/test/compile-fail/E0137.rs [deleted file]
src/test/compile-fail/E0138.rs [deleted file]
src/test/compile-fail/E0152.rs [deleted file]
src/test/compile-fail/E0161.rs [deleted file]
src/test/compile-fail/E0162.rs [deleted file]
src/test/compile-fail/E0164.rs [deleted file]
src/test/compile-fail/E0165.rs [deleted file]
src/test/compile-fail/E0184.rs [deleted file]
src/test/compile-fail/E0185.rs [deleted file]
src/test/compile-fail/E0186.rs [deleted file]
src/test/compile-fail/E0191.rs [deleted file]
src/test/compile-fail/E0192.rs [deleted file]
src/test/compile-fail/E0194.rs [deleted file]
src/test/compile-fail/E0195.rs [deleted file]
src/test/compile-fail/E0197.rs [deleted file]
src/test/compile-fail/E0198.rs [deleted file]
src/test/compile-fail/E0199.rs [deleted file]
src/test/compile-fail/E0200.rs [deleted file]
src/test/compile-fail/E0201.rs [deleted file]
src/test/compile-fail/E0206.rs [deleted file]
src/test/compile-fail/E0207.rs [deleted file]
src/test/compile-fail/E0214.rs [deleted file]
src/test/compile-fail/E0220.rs [deleted file]
src/test/compile-fail/E0221.rs [deleted file]
src/test/compile-fail/E0223.rs [deleted file]
src/test/compile-fail/E0225.rs [deleted file]
src/test/compile-fail/E0229.rs [deleted file]
src/test/compile-fail/E0232.rs [deleted file]
src/test/compile-fail/E0243.rs [deleted file]
src/test/compile-fail/E0244.rs [deleted file]
src/test/compile-fail/E0252.rs [deleted file]
src/test/compile-fail/E0253.rs [deleted file]
src/test/compile-fail/E0254.rs [deleted file]
src/test/compile-fail/E0255.rs [deleted file]
src/test/compile-fail/E0259.rs [deleted file]
src/test/compile-fail/E0260.rs [deleted file]
src/test/compile-fail/E0261.rs [deleted file]
src/test/compile-fail/E0262.rs [deleted file]
src/test/compile-fail/E0263.rs [deleted file]
src/test/compile-fail/E0264.rs [deleted file]
src/test/compile-fail/E0267.rs [deleted file]
src/test/compile-fail/E0268.rs [deleted file]
src/test/compile-fail/E0271.rs [deleted file]
src/test/compile-fail/E0275.rs [deleted file]
src/test/compile-fail/E0276.rs [deleted file]
src/test/compile-fail/E0277-2.rs [deleted file]
src/test/compile-fail/E0277.rs [deleted file]
src/test/compile-fail/E0282.rs [deleted file]
src/test/compile-fail/E0283.rs [deleted file]
src/test/compile-fail/E0296.rs [deleted file]
src/test/compile-fail/E0297.rs [deleted file]
src/test/compile-fail/E0301.rs [deleted file]
src/test/compile-fail/E0302.rs [deleted file]
src/test/compile-fail/E0303.rs [deleted file]
src/test/compile-fail/E0308-4.rs [deleted file]
src/test/compile-fail/E0308.rs [deleted file]
src/test/compile-fail/E0365.rs [deleted file]
src/test/compile-fail/E0370.rs [deleted file]
src/test/compile-fail/E0374.rs [deleted file]
src/test/compile-fail/E0375.rs [deleted file]
src/test/compile-fail/E0376.rs [deleted file]
src/test/compile-fail/E0388.rs [deleted file]
src/test/compile-fail/E0389.rs [deleted file]
src/test/compile-fail/E0390.rs [deleted file]
src/test/compile-fail/E0392.rs [deleted file]
src/test/compile-fail/E0393.rs [deleted file]
src/test/compile-fail/E0394.rs [deleted file]
src/test/compile-fail/E0395.rs [deleted file]
src/test/compile-fail/E0396.rs [deleted file]
src/test/compile-fail/E0401.rs [deleted file]
src/test/compile-fail/E0403.rs [deleted file]
src/test/compile-fail/E0404.rs [deleted file]
src/test/compile-fail/E0405.rs [deleted file]
src/test/compile-fail/E0407.rs [deleted file]
src/test/compile-fail/E0408.rs [deleted file]
src/test/compile-fail/E0411.rs [deleted file]
src/test/compile-fail/E0412.rs [deleted file]
src/test/compile-fail/E0415.rs [deleted file]
src/test/compile-fail/E0416.rs [deleted file]
src/test/compile-fail/E0423.rs [deleted file]
src/test/compile-fail/E0424.rs [deleted file]
src/test/compile-fail/E0425.rs [deleted file]
src/test/compile-fail/E0426.rs [deleted file]
src/test/compile-fail/E0428.rs [deleted file]
src/test/compile-fail/E0429.rs [deleted file]
src/test/compile-fail/E0430.rs [deleted file]
src/test/compile-fail/E0431.rs [deleted file]
src/test/compile-fail/E0432.rs [deleted file]
src/test/compile-fail/E0433.rs [deleted file]
src/test/compile-fail/E0434.rs [deleted file]
src/test/compile-fail/E0435.rs [deleted file]
src/test/compile-fail/E0437.rs [deleted file]
src/test/compile-fail/E0438.rs [deleted file]
src/test/compile-fail/E0439.rs [deleted file]
src/test/compile-fail/E0440.rs [deleted file]
src/test/compile-fail/E0441.rs [deleted file]
src/test/compile-fail/E0442.rs [deleted file]
src/test/compile-fail/E0443.rs [deleted file]
src/test/compile-fail/E0444.rs [deleted file]
src/test/compile-fail/E0445.rs [deleted file]
src/test/compile-fail/E0446.rs [deleted file]
src/test/compile-fail/E0449.rs [deleted file]
src/test/compile-fail/E0451.rs [deleted file]
src/test/compile-fail/E0452.rs [deleted file]
src/test/compile-fail/E0453.rs [deleted file]
src/test/compile-fail/E0454.rs [deleted file]
src/test/compile-fail/E0458.rs [deleted file]
src/test/compile-fail/E0459.rs [deleted file]
src/test/compile-fail/E0463.rs [deleted file]
src/test/compile-fail/E0478.rs [deleted file]
src/test/compile-fail/E0492.rs [deleted file]
src/test/compile-fail/E0494.rs [deleted file]
src/test/compile-fail/E0496.rs [deleted file]
src/test/compile-fail/E0499.rs [deleted file]
src/test/compile-fail/E0502.rs [deleted file]
src/test/compile-fail/E0503.rs [deleted file]
src/test/compile-fail/E0504.rs [deleted file]
src/test/compile-fail/E0505.rs [deleted file]
src/test/compile-fail/E0507.rs [deleted file]
src/test/compile-fail/E0509.rs [deleted file]
src/test/compile-fail/E0511.rs [deleted file]
src/test/compile-fail/E0512.rs [deleted file]
src/test/compile-fail/E0516.rs [deleted file]
src/test/compile-fail/E0517.rs [deleted file]
src/test/compile-fail/E0518.rs [deleted file]
src/test/compile-fail/E0520.rs [deleted file]
src/test/compile-fail/E0522.rs [deleted file]
src/test/compile-fail/E0527.rs [deleted file]
src/test/compile-fail/E0528.rs [deleted file]
src/test/compile-fail/E0529.rs [deleted file]
src/test/compile-fail/E0530.rs [deleted file]
src/test/compile-fail/E0532.rs [deleted file]
src/test/compile-fail/E0534.rs [deleted file]
src/test/compile-fail/E0558.rs [deleted file]
src/test/compile-fail/E0559.rs [deleted file]
src/test/compile-fail/E0560.rs [deleted file]
src/test/compile-fail/E0565-1.rs [deleted file]
src/test/compile-fail/E0565.rs [deleted file]
src/test/compile-fail/E0572.rs [deleted file]
src/test/compile-fail/E0582.rs [deleted file]
src/test/compile-fail/E0585.rs [deleted file]
src/test/compile-fail/E0586.rs [deleted file]
src/test/compile-fail/E0597.rs [deleted file]
src/test/compile-fail/E0599.rs [deleted file]
src/test/compile-fail/E0600.rs [deleted file]
src/test/compile-fail/E0602.rs [deleted file]
src/test/compile-fail/E0603.rs [deleted file]
src/test/compile-fail/E0604.rs [deleted file]
src/test/compile-fail/E0605.rs [deleted file]
src/test/compile-fail/E0606.rs [deleted file]
src/test/compile-fail/E0607.rs [deleted file]
src/test/compile-fail/E0608.rs [deleted file]
src/test/compile-fail/E0609.rs [deleted file]
src/test/compile-fail/E0610.rs [deleted file]
src/test/compile-fail/E0611.rs [deleted file]
src/test/compile-fail/E0612.rs [deleted file]
src/test/compile-fail/E0614.rs [deleted file]
src/test/compile-fail/E0615.rs [deleted file]
src/test/compile-fail/E0616.rs [deleted file]
src/test/compile-fail/E0617.rs [deleted file]
src/test/compile-fail/E0618.rs [deleted file]
src/test/compile-fail/E0619.rs [deleted file]
src/test/compile-fail/E0620.rs [deleted file]
src/test/compile-fail/E0621-does-not-trigger-for-closures.rs [deleted file]
src/test/compile-fail/E0622.rs [deleted file]
src/test/compile-fail/E0624.rs [deleted file]
src/test/compile-fail/E0637.rs [deleted file]
src/test/compile-fail/E0657.rs [deleted file]
src/test/compile-fail/E0658.rs [deleted file]
src/test/compile-fail/E0659.rs [deleted file]
src/test/ui/error-codes/E0001.rs [new file with mode: 0644]
src/test/ui/error-codes/E0001.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0004-2.rs [new file with mode: 0644]
src/test/ui/error-codes/E0004-2.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0004.rs [new file with mode: 0644]
src/test/ui/error-codes/E0004.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0005.rs [new file with mode: 0644]
src/test/ui/error-codes/E0005.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0007.rs [new file with mode: 0644]
src/test/ui/error-codes/E0007.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0008.rs [new file with mode: 0644]
src/test/ui/error-codes/E0008.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0009.rs [new file with mode: 0644]
src/test/ui/error-codes/E0009.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0010-teach.rs [new file with mode: 0644]
src/test/ui/error-codes/E0010-teach.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0010.rs [new file with mode: 0644]
src/test/ui/error-codes/E0010.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0017.rs [new file with mode: 0644]
src/test/ui/error-codes/E0017.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0023.rs [new file with mode: 0644]
src/test/ui/error-codes/E0023.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0025.rs [new file with mode: 0644]
src/test/ui/error-codes/E0025.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0026-teach.rs [new file with mode: 0644]
src/test/ui/error-codes/E0026-teach.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0026.rs [new file with mode: 0644]
src/test/ui/error-codes/E0026.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0027-teach.rs [new file with mode: 0644]
src/test/ui/error-codes/E0027-teach.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0027.rs [new file with mode: 0644]
src/test/ui/error-codes/E0027.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0029-teach.rs [new file with mode: 0644]
src/test/ui/error-codes/E0029-teach.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0029.rs [new file with mode: 0644]
src/test/ui/error-codes/E0029.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0030-teach.rs [new file with mode: 0644]
src/test/ui/error-codes/E0030-teach.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0030.rs [new file with mode: 0644]
src/test/ui/error-codes/E0030.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0033-teach.rs [new file with mode: 0644]
src/test/ui/error-codes/E0033-teach.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0033.rs [new file with mode: 0644]
src/test/ui/error-codes/E0033.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0034.rs [new file with mode: 0644]
src/test/ui/error-codes/E0034.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0038.rs [new file with mode: 0644]
src/test/ui/error-codes/E0038.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0040.rs [new file with mode: 0644]
src/test/ui/error-codes/E0040.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0044.rs [new file with mode: 0644]
src/test/ui/error-codes/E0044.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0045.rs [new file with mode: 0644]
src/test/ui/error-codes/E0045.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0049.rs [new file with mode: 0644]
src/test/ui/error-codes/E0049.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0050.rs [new file with mode: 0644]
src/test/ui/error-codes/E0050.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0054.rs [new file with mode: 0644]
src/test/ui/error-codes/E0054.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0055.rs [new file with mode: 0644]
src/test/ui/error-codes/E0055.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0057.rs [new file with mode: 0644]
src/test/ui/error-codes/E0057.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0059.rs [new file with mode: 0644]
src/test/ui/error-codes/E0059.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0060.rs [new file with mode: 0644]
src/test/ui/error-codes/E0060.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0061.rs [new file with mode: 0644]
src/test/ui/error-codes/E0061.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0062.rs [new file with mode: 0644]
src/test/ui/error-codes/E0062.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0063.rs [new file with mode: 0644]
src/test/ui/error-codes/E0063.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0067.rs [new file with mode: 0644]
src/test/ui/error-codes/E0067.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0069.rs [new file with mode: 0644]
src/test/ui/error-codes/E0069.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0070.rs [new file with mode: 0644]
src/test/ui/error-codes/E0070.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0071.rs [new file with mode: 0644]
src/test/ui/error-codes/E0071.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0075.rs [new file with mode: 0644]
src/test/ui/error-codes/E0075.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0076.rs [new file with mode: 0644]
src/test/ui/error-codes/E0076.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0077.rs [new file with mode: 0644]
src/test/ui/error-codes/E0077.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0080.rs [new file with mode: 0644]
src/test/ui/error-codes/E0080.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0081.rs [new file with mode: 0644]
src/test/ui/error-codes/E0081.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0084.rs [new file with mode: 0644]
src/test/ui/error-codes/E0084.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0087.rs [new file with mode: 0644]
src/test/ui/error-codes/E0087.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0088.rs [new file with mode: 0644]
src/test/ui/error-codes/E0088.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0089.rs [new file with mode: 0644]
src/test/ui/error-codes/E0089.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0090.rs [new file with mode: 0644]
src/test/ui/error-codes/E0090.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0091.rs [new file with mode: 0644]
src/test/ui/error-codes/E0091.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0092.rs [new file with mode: 0644]
src/test/ui/error-codes/E0092.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0093.rs [new file with mode: 0644]
src/test/ui/error-codes/E0093.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0094.rs [new file with mode: 0644]
src/test/ui/error-codes/E0094.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0106.rs [new file with mode: 0644]
src/test/ui/error-codes/E0106.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0107.rs [new file with mode: 0644]
src/test/ui/error-codes/E0107.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0109.rs [new file with mode: 0644]
src/test/ui/error-codes/E0109.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0110.rs [new file with mode: 0644]
src/test/ui/error-codes/E0110.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0116.rs [new file with mode: 0644]
src/test/ui/error-codes/E0116.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0117.rs [new file with mode: 0644]
src/test/ui/error-codes/E0117.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0118.rs [new file with mode: 0644]
src/test/ui/error-codes/E0118.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0119.rs [new file with mode: 0644]
src/test/ui/error-codes/E0119.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0120.rs [new file with mode: 0644]
src/test/ui/error-codes/E0120.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0121.rs [new file with mode: 0644]
src/test/ui/error-codes/E0121.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0124.rs [new file with mode: 0644]
src/test/ui/error-codes/E0124.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0128.rs [new file with mode: 0644]
src/test/ui/error-codes/E0128.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0130.rs [new file with mode: 0644]
src/test/ui/error-codes/E0130.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0131.rs [new file with mode: 0644]
src/test/ui/error-codes/E0131.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0132.rs [new file with mode: 0644]
src/test/ui/error-codes/E0132.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0133.rs [new file with mode: 0644]
src/test/ui/error-codes/E0133.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0137.rs [new file with mode: 0644]
src/test/ui/error-codes/E0137.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0138.rs [new file with mode: 0644]
src/test/ui/error-codes/E0138.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0152.rs [new file with mode: 0644]
src/test/ui/error-codes/E0152.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0161.rs [new file with mode: 0644]
src/test/ui/error-codes/E0161.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0162.rs [new file with mode: 0644]
src/test/ui/error-codes/E0162.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0164.rs [new file with mode: 0644]
src/test/ui/error-codes/E0164.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0165.rs [new file with mode: 0644]
src/test/ui/error-codes/E0165.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0184.rs [new file with mode: 0644]
src/test/ui/error-codes/E0184.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0185.rs [new file with mode: 0644]
src/test/ui/error-codes/E0185.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0186.rs [new file with mode: 0644]
src/test/ui/error-codes/E0186.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0191.rs [new file with mode: 0644]
src/test/ui/error-codes/E0191.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0192.rs [new file with mode: 0644]
src/test/ui/error-codes/E0192.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0194.rs [new file with mode: 0644]
src/test/ui/error-codes/E0194.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0195.rs [new file with mode: 0644]
src/test/ui/error-codes/E0195.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0197.rs [new file with mode: 0644]
src/test/ui/error-codes/E0197.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0198.rs [new file with mode: 0644]
src/test/ui/error-codes/E0198.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0199.rs [new file with mode: 0644]
src/test/ui/error-codes/E0199.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0200.rs [new file with mode: 0644]
src/test/ui/error-codes/E0200.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0201.rs [new file with mode: 0644]
src/test/ui/error-codes/E0201.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0206.rs [new file with mode: 0644]
src/test/ui/error-codes/E0206.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0207.rs [new file with mode: 0644]
src/test/ui/error-codes/E0207.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0214.rs [new file with mode: 0644]
src/test/ui/error-codes/E0214.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0220.rs [new file with mode: 0644]
src/test/ui/error-codes/E0220.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0221.rs [new file with mode: 0644]
src/test/ui/error-codes/E0221.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0223.rs [new file with mode: 0644]
src/test/ui/error-codes/E0223.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0225.rs [new file with mode: 0644]
src/test/ui/error-codes/E0225.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0229.rs [new file with mode: 0644]
src/test/ui/error-codes/E0229.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0232.rs [new file with mode: 0644]
src/test/ui/error-codes/E0232.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0243.rs [new file with mode: 0644]
src/test/ui/error-codes/E0243.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0244.rs [new file with mode: 0644]
src/test/ui/error-codes/E0244.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0252.rs [new file with mode: 0644]
src/test/ui/error-codes/E0252.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0253.rs [new file with mode: 0644]
src/test/ui/error-codes/E0253.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0254.rs [new file with mode: 0644]
src/test/ui/error-codes/E0254.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0255.rs [new file with mode: 0644]
src/test/ui/error-codes/E0255.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0259.rs [new file with mode: 0644]
src/test/ui/error-codes/E0259.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0260.rs [new file with mode: 0644]
src/test/ui/error-codes/E0260.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0261.rs [new file with mode: 0644]
src/test/ui/error-codes/E0261.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0262.rs [new file with mode: 0644]
src/test/ui/error-codes/E0262.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0263.rs [new file with mode: 0644]
src/test/ui/error-codes/E0263.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0264.rs [new file with mode: 0644]
src/test/ui/error-codes/E0264.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0267.rs [new file with mode: 0644]
src/test/ui/error-codes/E0267.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0268.rs [new file with mode: 0644]
src/test/ui/error-codes/E0268.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0271.rs [new file with mode: 0644]
src/test/ui/error-codes/E0271.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0275.rs [new file with mode: 0644]
src/test/ui/error-codes/E0275.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0276.rs [new file with mode: 0644]
src/test/ui/error-codes/E0276.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0277-2.rs [new file with mode: 0644]
src/test/ui/error-codes/E0277-2.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0277.rs [new file with mode: 0644]
src/test/ui/error-codes/E0277.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0282.rs [new file with mode: 0644]
src/test/ui/error-codes/E0282.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0283.rs [new file with mode: 0644]
src/test/ui/error-codes/E0283.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0296.rs [new file with mode: 0644]
src/test/ui/error-codes/E0296.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0297.rs [new file with mode: 0644]
src/test/ui/error-codes/E0297.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0301.rs [new file with mode: 0644]
src/test/ui/error-codes/E0301.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0302.rs [new file with mode: 0644]
src/test/ui/error-codes/E0302.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0303.rs [new file with mode: 0644]
src/test/ui/error-codes/E0303.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0308-4.rs [new file with mode: 0644]
src/test/ui/error-codes/E0308-4.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0308.rs [new file with mode: 0644]
src/test/ui/error-codes/E0308.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0365.rs [new file with mode: 0644]
src/test/ui/error-codes/E0365.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0370.rs [new file with mode: 0644]
src/test/ui/error-codes/E0370.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0374.rs [new file with mode: 0644]
src/test/ui/error-codes/E0374.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0375.rs [new file with mode: 0644]
src/test/ui/error-codes/E0375.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0376.rs [new file with mode: 0644]
src/test/ui/error-codes/E0376.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0388.rs [new file with mode: 0644]
src/test/ui/error-codes/E0388.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0389.rs [new file with mode: 0644]
src/test/ui/error-codes/E0389.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0390.rs [new file with mode: 0644]
src/test/ui/error-codes/E0390.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0392.rs [new file with mode: 0644]
src/test/ui/error-codes/E0392.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0393.rs [new file with mode: 0644]
src/test/ui/error-codes/E0393.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0394.rs [new file with mode: 0644]
src/test/ui/error-codes/E0394.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0395.rs [new file with mode: 0644]
src/test/ui/error-codes/E0395.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0396.rs [new file with mode: 0644]
src/test/ui/error-codes/E0396.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0401.rs [new file with mode: 0644]
src/test/ui/error-codes/E0401.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0403.rs [new file with mode: 0644]
src/test/ui/error-codes/E0403.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0404.rs [new file with mode: 0644]
src/test/ui/error-codes/E0404.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0405.rs [new file with mode: 0644]
src/test/ui/error-codes/E0405.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0407.rs [new file with mode: 0644]
src/test/ui/error-codes/E0407.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0408.rs [new file with mode: 0644]
src/test/ui/error-codes/E0408.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0411.rs [new file with mode: 0644]
src/test/ui/error-codes/E0411.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0412.rs [new file with mode: 0644]
src/test/ui/error-codes/E0412.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0415.rs [new file with mode: 0644]
src/test/ui/error-codes/E0415.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0416.rs [new file with mode: 0644]
src/test/ui/error-codes/E0416.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0423.rs [new file with mode: 0644]
src/test/ui/error-codes/E0423.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0424.rs [new file with mode: 0644]
src/test/ui/error-codes/E0424.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0425.rs [new file with mode: 0644]
src/test/ui/error-codes/E0425.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0426.rs [new file with mode: 0644]
src/test/ui/error-codes/E0426.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0428.rs [new file with mode: 0644]
src/test/ui/error-codes/E0428.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0429.rs [new file with mode: 0644]
src/test/ui/error-codes/E0429.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0430.rs [new file with mode: 0644]
src/test/ui/error-codes/E0430.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0431.rs [new file with mode: 0644]
src/test/ui/error-codes/E0431.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0432.rs [new file with mode: 0644]
src/test/ui/error-codes/E0432.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0433.rs [new file with mode: 0644]
src/test/ui/error-codes/E0433.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0434.rs [new file with mode: 0644]
src/test/ui/error-codes/E0434.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0435.rs [new file with mode: 0644]
src/test/ui/error-codes/E0435.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0437.rs [new file with mode: 0644]
src/test/ui/error-codes/E0437.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0438.rs [new file with mode: 0644]
src/test/ui/error-codes/E0438.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0439.rs [new file with mode: 0644]
src/test/ui/error-codes/E0439.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0440.rs [new file with mode: 0644]
src/test/ui/error-codes/E0440.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0441.rs [new file with mode: 0644]
src/test/ui/error-codes/E0441.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0442.rs [new file with mode: 0644]
src/test/ui/error-codes/E0442.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0443.rs [new file with mode: 0644]
src/test/ui/error-codes/E0443.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0444.rs [new file with mode: 0644]
src/test/ui/error-codes/E0444.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0445.rs [new file with mode: 0644]
src/test/ui/error-codes/E0445.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0446.rs [new file with mode: 0644]
src/test/ui/error-codes/E0446.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0449.rs [new file with mode: 0644]
src/test/ui/error-codes/E0449.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0451.rs [new file with mode: 0644]
src/test/ui/error-codes/E0451.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0452.rs [new file with mode: 0644]
src/test/ui/error-codes/E0452.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0453.rs [new file with mode: 0644]
src/test/ui/error-codes/E0453.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0454.rs [new file with mode: 0644]
src/test/ui/error-codes/E0454.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0458.rs [new file with mode: 0644]
src/test/ui/error-codes/E0458.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0459.rs [new file with mode: 0644]
src/test/ui/error-codes/E0459.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0463.rs [new file with mode: 0644]
src/test/ui/error-codes/E0463.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0478.rs [new file with mode: 0644]
src/test/ui/error-codes/E0478.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0492.rs [new file with mode: 0644]
src/test/ui/error-codes/E0492.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0494.rs [new file with mode: 0644]
src/test/ui/error-codes/E0494.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0496.rs [new file with mode: 0644]
src/test/ui/error-codes/E0496.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0499.rs [new file with mode: 0644]
src/test/ui/error-codes/E0499.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0502.rs [new file with mode: 0644]
src/test/ui/error-codes/E0502.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0503.rs [new file with mode: 0644]
src/test/ui/error-codes/E0503.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0504.rs [new file with mode: 0644]
src/test/ui/error-codes/E0504.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0505.rs [new file with mode: 0644]
src/test/ui/error-codes/E0505.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0507.rs [new file with mode: 0644]
src/test/ui/error-codes/E0507.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0509.rs [new file with mode: 0644]
src/test/ui/error-codes/E0509.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0511.rs [new file with mode: 0644]
src/test/ui/error-codes/E0511.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0512.rs [new file with mode: 0644]
src/test/ui/error-codes/E0512.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0516.rs [new file with mode: 0644]
src/test/ui/error-codes/E0516.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0517.rs [new file with mode: 0644]
src/test/ui/error-codes/E0517.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0518.rs [new file with mode: 0644]
src/test/ui/error-codes/E0518.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0520.rs [new file with mode: 0644]
src/test/ui/error-codes/E0520.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0522.rs [new file with mode: 0644]
src/test/ui/error-codes/E0522.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0527.rs [new file with mode: 0644]
src/test/ui/error-codes/E0527.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0528.rs [new file with mode: 0644]
src/test/ui/error-codes/E0528.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0529.rs [new file with mode: 0644]
src/test/ui/error-codes/E0529.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0530.rs [new file with mode: 0644]
src/test/ui/error-codes/E0530.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0532.rs [new file with mode: 0644]
src/test/ui/error-codes/E0532.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0534.rs [new file with mode: 0644]
src/test/ui/error-codes/E0534.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0558.rs [new file with mode: 0644]
src/test/ui/error-codes/E0558.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0559.rs [new file with mode: 0644]
src/test/ui/error-codes/E0559.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0560.rs [new file with mode: 0644]
src/test/ui/error-codes/E0560.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0565-1.rs [new file with mode: 0644]
src/test/ui/error-codes/E0565-1.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0565.rs [new file with mode: 0644]
src/test/ui/error-codes/E0565.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0572.rs [new file with mode: 0644]
src/test/ui/error-codes/E0572.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0582.rs [new file with mode: 0644]
src/test/ui/error-codes/E0582.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0585.rs [new file with mode: 0644]
src/test/ui/error-codes/E0585.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0586.rs [new file with mode: 0644]
src/test/ui/error-codes/E0586.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0597.rs [new file with mode: 0644]
src/test/ui/error-codes/E0597.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0599.rs [new file with mode: 0644]
src/test/ui/error-codes/E0599.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0600.rs [new file with mode: 0644]
src/test/ui/error-codes/E0600.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0602.rs [new file with mode: 0644]
src/test/ui/error-codes/E0602.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0603.rs [new file with mode: 0644]
src/test/ui/error-codes/E0603.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0604.rs [new file with mode: 0644]
src/test/ui/error-codes/E0604.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0605.rs [new file with mode: 0644]
src/test/ui/error-codes/E0605.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0606.rs [new file with mode: 0644]
src/test/ui/error-codes/E0606.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0607.rs [new file with mode: 0644]
src/test/ui/error-codes/E0607.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0608.rs [new file with mode: 0644]
src/test/ui/error-codes/E0608.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0609.rs [new file with mode: 0644]
src/test/ui/error-codes/E0609.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0610.rs [new file with mode: 0644]
src/test/ui/error-codes/E0610.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0611.rs [new file with mode: 0644]
src/test/ui/error-codes/E0611.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0612.rs [new file with mode: 0644]
src/test/ui/error-codes/E0612.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0614.rs [new file with mode: 0644]
src/test/ui/error-codes/E0614.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0615.rs [new file with mode: 0644]
src/test/ui/error-codes/E0615.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0616.rs [new file with mode: 0644]
src/test/ui/error-codes/E0616.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0617.rs [new file with mode: 0644]
src/test/ui/error-codes/E0617.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0618.rs [new file with mode: 0644]
src/test/ui/error-codes/E0618.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0619.rs [new file with mode: 0644]
src/test/ui/error-codes/E0619.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0620.rs [new file with mode: 0644]
src/test/ui/error-codes/E0620.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0621-does-not-trigger-for-closures.rs [new file with mode: 0644]
src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0622.rs [new file with mode: 0644]
src/test/ui/error-codes/E0622.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0624.rs [new file with mode: 0644]
src/test/ui/error-codes/E0624.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0637.rs [new file with mode: 0644]
src/test/ui/error-codes/E0637.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0657.rs [new file with mode: 0644]
src/test/ui/error-codes/E0657.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0658.rs [new file with mode: 0644]
src/test/ui/error-codes/E0658.stderr [new file with mode: 0644]
src/test/ui/error-codes/E0659.rs [new file with mode: 0644]
src/test/ui/error-codes/E0659.stderr [new file with mode: 0644]

index 31e054ec1cb93d1f78dae98c08715bfda02e941a..8b4b9aaeac848b98c85c1eb3c2aa5b84422314b6 100644 (file)
@@ -175,6 +175,10 @@ fn configure_main(this: &mut EntryContext) {
             err.emit();
             this.session.abort_if_errors();
         } else {
+            if this.session.teach(&err.get_code().unwrap()) {
+                err.note("If you don't know the basics of Rust, you can go look to the Rust Book \
+                          to get started: https://doc.rust-lang.org/book/");
+            }
             err.emit();
         }
     }
index 11dc34717a96d117d41057710e9417d79f2d09f2..2b9ee223b01a478295f2c38c9a41f8151d195b3b 100644 (file)
@@ -170,8 +170,20 @@ fn new(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     fn not_const(&mut self) {
         self.add(Qualif::NOT_CONST);
         if self.mode != Mode::Fn {
-            span_err!(self.tcx.sess, self.span, E0019,
-                      "{} contains unimplemented expression type", self.mode);
+            let mut err = struct_span_err!(
+                self.tcx.sess,
+                self.span,
+                E0019,
+                "{} contains unimplemented expression type",
+                self.mode
+            );
+            if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                err.note("A function call isn't allowed in the const's initialization expression \
+                          because the expression's value must be known at compile-time.");
+                err.note("Remember: you can't use a function call inside a const's initialization \
+                          expression! However, you can use it anywhere else.");
+            }
+            err.emit();
         }
     }
 
@@ -179,9 +191,19 @@ fn not_const(&mut self) {
     fn statement_like(&mut self) {
         self.add(Qualif::NOT_CONST);
         if self.mode != Mode::Fn {
-            span_err!(self.tcx.sess, self.span, E0016,
-                      "blocks in {}s are limited to items and tail expressions",
-                      self.mode);
+            let mut err = struct_span_err!(
+                self.tcx.sess,
+                self.span,
+                E0016,
+                "blocks in {}s are limited to items and tail expressions",
+                self.mode
+            );
+            if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                err.note("Blocks in constants may only contain items (such as constant, function \
+                          definition, etc...) and a tail expression.");
+                err.help("To avoid it, you have to replace the non-item object.");
+            }
+            err.emit();
         }
     }
 
@@ -475,9 +497,19 @@ fn visit_place(&mut self,
                 }
 
                 if self.mode == Mode::Const || self.mode == Mode::ConstFn {
-                    span_err!(self.tcx.sess, self.span, E0013,
-                              "{}s cannot refer to statics, use \
-                               a constant instead", self.mode);
+                    let mut err = struct_span_err!(self.tcx.sess, self.span, E0013,
+                                                   "{}s cannot refer to statics, use \
+                                                    a constant instead", self.mode);
+                    if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                        err.note(
+                            "Static and const variables can refer to other const variables. But a \
+                             const variable cannot refer to a static variable."
+                        );
+                        err.help(
+                            "To fix this, the value can be extracted as a const and then used."
+                        );
+                    }
+                    err.emit()
                 }
             }
             Place::Projection(ref proj) => {
@@ -498,13 +530,25 @@ fn visit_place(&mut self,
                             if let ty::TyRawPtr(_) = base_ty.sty {
                                 this.add(Qualif::NOT_CONST);
                                 if this.mode != Mode::Fn {
-                                    struct_span_err!(this.tcx.sess,
-                                        this.span, E0396,
+                                    let mut err = struct_span_err!(
+                                        this.tcx.sess,
+                                        this.span,
+                                        E0396,
                                         "raw pointers cannot be dereferenced in {}s",
-                                        this.mode)
-                                    .span_label(this.span,
-                                        "dereference of raw pointer in constant")
-                                    .emit();
+                                        this.mode
+                                    );
+                                    err.span_label(this.span,
+                                                   "dereference of raw pointer in constant");
+                                    if this.tcx.sess.teach(&err.get_code().unwrap()) {
+                                        err.note(
+                                            "The value behind a raw pointer can't be determined \
+                                             at compile-time (or even link-time), which means it \
+                                             can't be used in a constant expression."
+                                        );
+                                        err.help("A possible fix is to dereference your pointer \
+                                                  at some point in run-time.");
+                                    }
+                                    err.emit();
                                 }
                             }
                         }
@@ -623,12 +667,22 @@ fn visit_rvalue(&mut self, rvalue: &Rvalue<'tcx>, location: Location) {
                     if !allow {
                         self.add(Qualif::NOT_CONST);
                         if self.mode != Mode::Fn {
-                            struct_span_err!(self.tcx.sess,  self.span, E0017,
-                                             "references in {}s may only refer \
-                                              to immutable values", self.mode)
-                                .span_label(self.span, format!("{}s require immutable values",
-                                                                self.mode))
-                                .emit();
+                            let mut err = struct_span_err!(self.tcx.sess,  self.span, E0017,
+                                                           "references in {}s may only refer \
+                                                            to immutable values", self.mode);
+                            err.span_label(self.span, format!("{}s require immutable values",
+                                                                self.mode));
+                            if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                                err.note("References in statics and constants may only refer to \
+                                          immutable values.\n\n\
+                                          Statics are shared everywhere, and if they refer to \
+                                          mutable data one might violate memory safety since \
+                                          holding multiple mutable references to shared data is \
+                                          not allowed.\n\n\
+                                          If you really want global mutable state, try using \
+                                          static mut or a global UnsafeCell.");
+                            }
+                            err.emit();
                         }
                     }
                 } else {
@@ -669,9 +723,42 @@ fn visit_rvalue(&mut self, rvalue: &Rvalue<'tcx>, location: Location) {
                     (CastTy::FnPtr, CastTy::Int(_)) => {
                         self.add(Qualif::NOT_CONST);
                         if self.mode != Mode::Fn {
-                            span_err!(self.tcx.sess, self.span, E0018,
-                                      "raw pointers cannot be cast to integers in {}s",
-                                      self.mode);
+                            let mut err = struct_span_err!(
+                                self.tcx.sess,
+                                self.span,
+                                E0018,
+                                "raw pointers cannot be cast to integers in {}s",
+                                self.mode
+                            );
+                            if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                                err.note("\
+The value of static and constant integers must be known at compile time. You can't cast a pointer \
+to an integer because the address of a pointer can vary.
+
+For example, if you write:
+
+```
+static MY_STATIC: u32 = 42;
+static MY_STATIC_ADDR: usize = &MY_STATIC as *const _ as usize;
+static WHAT: usize = (MY_STATIC_ADDR^17) + MY_STATIC_ADDR;
+```
+
+Then `MY_STATIC_ADDR` would contain the address of `MY_STATIC`. However, the address can change \
+when the program is linked, as well as change between different executions due to ASLR, and many \
+linkers would not be able to calculate the value of `WHAT`.
+
+On the other hand, static and constant pointers can point either to a known numeric address or to \
+the address of a symbol.
+
+```
+static MY_STATIC: u32 = 42;
+static MY_STATIC_ADDR: &'static u32 = &MY_STATIC;
+const CONST_ADDR: *const u8 = 0x5f3759df as *const u8;
+```
+
+This does not pose a problem by itself because they can't be accessed directly.");
+                            }
+                            err.emit();
                         }
                     }
                     _ => {}
@@ -702,10 +789,18 @@ fn visit_rvalue(&mut self, rvalue: &Rvalue<'tcx>, location: Location) {
             Rvalue::NullaryOp(NullOp::Box, _) => {
                 self.add(Qualif::NOT_CONST);
                 if self.mode != Mode::Fn {
-                    struct_span_err!(self.tcx.sess, self.span, E0010,
-                                     "allocations are not allowed in {}s", self.mode)
-                        .span_label(self.span, format!("allocation not allowed in {}s", self.mode))
-                        .emit();
+                    let mut err = struct_span_err!(self.tcx.sess, self.span, E0010,
+                                                   "allocations are not allowed in {}s", self.mode);
+                    err.span_label(self.span, format!("allocation not allowed in {}s", self.mode));
+                    if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                        err.note(
+                            "The value of statics and constants must be known at compile time, \
+                             and they live for the entire lifetime of a program. Creating a boxed \
+                             value allocates memory on the heap at runtime, and therefore cannot \
+                             be done at compile time."
+                        );
+                    }
+                    err.emit();
                 }
             }
 
@@ -931,9 +1026,22 @@ fn visit_assign(&mut self,
                 // Avoid a generic error for other uses of arguments.
                 if self.qualif.intersects(Qualif::FN_ARGUMENT) {
                     let decl = &self.mir.local_decls[index];
-                    span_err!(self.tcx.sess, decl.source_info.span, E0022,
-                              "arguments of constant functions can only \
-                               be immutable by-value bindings");
+                    let mut err = struct_span_err!(
+                        self.tcx.sess,
+                        decl.source_info.span,
+                        E0022,
+                        "arguments of constant functions can only be immutable by-value bindings"
+                    );
+                    if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                        err.note("Constant functions are not allowed to mutate anything. Thus, \
+                                  binding to an argument with a mutable pattern is not allowed.");
+                        err.note("Remove any mutable bindings from the argument list to fix this \
+                                  error. In case you need to mutate the argument, try lazily \
+                                  initializing a global variable instead of using a const fn, or \
+                                  refactoring the code to a functional style to avoid mutation if \
+                                  possible.");
+                    }
+                    err.emit();
                     return;
                 }
             }
index 6df860492f05af022bb98ec46dbacda07b2b986d..59864182a7e406fb0d60bdf300909f9989620317 100644 (file)
@@ -237,10 +237,20 @@ fn visit_pat(&mut self, p: &'tcx hir::Pat) {
                     Ok(Ordering::Less) |
                     Ok(Ordering::Equal) => {}
                     Ok(Ordering::Greater) => {
-                        struct_span_err!(self.tcx.sess, start.span, E0030,
-                            "lower range bound must be less than or equal to upper")
-                            .span_label(start.span, "lower bound larger than upper bound")
-                            .emit();
+                        let mut err = struct_span_err!(
+                            self.tcx.sess,
+                            start.span,
+                            E0030,
+                            "lower range bound must be less than or equal to upper"
+                        );
+                        err.span_label(start.span, "lower bound larger than upper bound");
+                        if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                            err.note("When matching against a range, the compiler verifies that \
+                                      the range is non-empty. Range patterns include both \
+                                      end-points, so this is equivalent to requiring the start of \
+                                      the range to be less than or equal to the end of the range.");
+                        }
+                        err.emit();
                     }
                     Err(ErrorReported) => {}
                 }
index 1a285cd869aecad1a376251aa7e80001b1d80617..bf253a88d27c2e270f5da4f44f29e7e605ef817f 100644 (file)
@@ -214,12 +214,25 @@ pub fn check_pat_walk(
                         end.span
                     };
 
-                    struct_span_err!(tcx.sess, span, E0029,
-                        "only char and numeric types are allowed in range patterns")
-                        .span_label(span, "ranges require char or numeric types")
-                        .note(&format!("start type: {}", self.ty_to_string(lhs_ty)))
-                        .note(&format!("end type: {}", self.ty_to_string(rhs_ty)))
-                        .emit();
+                    let mut err = struct_span_err!(
+                        tcx.sess,
+                        span,
+                        E0029,
+                        "only char and numeric types are allowed in range patterns"
+                    );
+                    err.span_label(span, "ranges require char or numeric types");
+                    err.note(&format!("start type: {}", self.ty_to_string(lhs_ty)));
+                    err.note(&format!("end type: {}", self.ty_to_string(rhs_ty)));
+                    if tcx.sess.teach(&err.get_code().unwrap()) {
+                        err.note(
+                            "In a match expression, only numbers and characters can be matched \
+                             against a range. This is because the compiler checks that the range \
+                             is non-empty at compile-time, and is unable to evaluate arbitrary \
+                             comparison functions. If you want to capture values of an orderable \
+                             type between two end-points, you can use a guard."
+                         );
+                    }
+                    err.emit();
                     return;
                 }
 
@@ -505,10 +518,25 @@ pub fn check_dereferencable(&self, span: Span, expected: Ty<'tcx>, inner: &hir::
                     // This is "x = SomeTrait" being reduced from
                     // "let &x = &SomeTrait" or "let box x = Box<SomeTrait>", an error.
                     let type_str = self.ty_to_string(expected);
-                    struct_span_err!(self.tcx.sess, span, E0033,
-                              "type `{}` cannot be dereferenced", type_str)
-                        .span_label(span, format!("type `{}` cannot be dereferenced", type_str))
-                        .emit();
+                    let mut err = struct_span_err!(
+                        self.tcx.sess,
+                        span,
+                        E0033,
+                        "type `{}` cannot be dereferenced",
+                        type_str
+                    );
+                    err.span_label(span, format!("type `{}` cannot be dereferenced", type_str));
+                    if self.tcx.sess.teach(&err.get_code().unwrap()) {
+                        err.note("\
+This error indicates that a pointer to a trait type cannot be implicitly dereferenced by a \
+pattern. Every trait defines a type, but because the size of trait implementors isn't fixed, \
+this type has no compile-time size. Therefore, all accesses to trait types must be through \
+pointers. If you encounter this error you should try to avoid dereferencing the pointer.
+
+You can read more about trait objects in the Trait Objects section of the Reference: \
+https://doc.rust-lang.org/reference/types.html#trait-objects");
+                    }
+                    err.emit();
                     return false
                 }
             }
@@ -881,17 +909,33 @@ fn check_struct_pat_fields(&self,
                             self.field_ty(span, f, substs)
                         })
                         .unwrap_or_else(|| {
-                            struct_span_err!(tcx.sess, span, E0026,
-                                             "{} `{}` does not have a field named `{}`",
-                                             kind_name,
-                                             tcx.item_path_str(variant.did),
-                                             field.name)
-                                .span_label(span,
-                                            format!("{} `{}` does not have field `{}`",
-                                                     kind_name,
-                                                     tcx.item_path_str(variant.did),
-                                                     field.name))
-                                .emit();
+                            let mut err = struct_span_err!(
+                                tcx.sess,
+                                span,
+                                E0026,
+                                "{} `{}` does not have a field named `{}`",
+                                kind_name,
+                                tcx.item_path_str(variant.did),
+                                field.name
+                            );
+                            err.span_label(span,
+                                           format!("{} `{}` does not have field `{}`",
+                                                   kind_name,
+                                                   tcx.item_path_str(variant.did),
+                                                   field.name));
+                            if tcx.sess.teach(&err.get_code().unwrap()) {
+                                err.note(
+                                    "This error indicates that a struct pattern attempted to \
+                                     extract a non-existent field from a struct. Struct fields \
+                                     are identified by the name used before the colon : so struct \
+                                     patterns should resemble the declaration of the struct type \
+                                     being matched.\n\n\
+                                     If you are using shorthand field patterns but want to refer \
+                                     to the struct field by a different name, you should rename \
+                                     it explicitly."
+                                );
+                            }
+                            err.emit();
 
                             tcx.types.err
                         })
@@ -927,6 +971,14 @@ fn check_struct_pat_fields(&self,
                 if variant.ctor_kind == CtorKind::Fn {
                     diag.note("trying to match a tuple variant with a struct variant pattern");
                 }
+                if tcx.sess.teach(&diag.get_code().unwrap()) {
+                    diag.note(
+                        "This error indicates that a pattern for a struct fails to specify a \
+                         sub-pattern for every one of the struct's fields. Ensure that each field \
+                         from the struct's definition is mentioned in the pattern, or use `..` to \
+                         ignore unwanted fields."
+                    );
+                }
                 diag.emit();
             }
         }
diff --git a/src/test/compile-fail/E0001.rs b/src/test/compile-fail/E0001.rs
deleted file mode 100644 (file)
index b72b0d6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![deny(unreachable_patterns)]
-
-fn main() {
-    let foo = Some(1);
-    match foo {
-        Some(_) => {/* ... */}
-        None => {/* ... */}
-        _ => {/* ... */} //~ ERROR unreachable pattern
-    }
-}
diff --git a/src/test/compile-fail/E0004-2.rs b/src/test/compile-fail/E0004-2.rs
deleted file mode 100644 (file)
index 824b86c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = Some(1);
-
-    match x { } //~ ERROR E0004
-}
diff --git a/src/test/compile-fail/E0004.rs b/src/test/compile-fail/E0004.rs
deleted file mode 100644 (file)
index 8df07a0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Terminator {
-    HastaLaVistaBaby,
-    TalkToMyHand,
-}
-
-fn main() {
-    let x = Terminator::HastaLaVistaBaby;
-
-    match x { //~ ERROR E0004
-        Terminator::TalkToMyHand => {}
-    }
-}
diff --git a/src/test/compile-fail/E0005.rs b/src/test/compile-fail/E0005.rs
deleted file mode 100644 (file)
index 0405bba..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = Some(1);
-    let Some(y) = x; //~ ERROR E0005
-}
diff --git a/src/test/compile-fail/E0007.rs b/src/test/compile-fail/E0007.rs
deleted file mode 100644 (file)
index d5acbde..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = Some("s".to_string());
-    match x {
-        op_string @ Some(s) => {},
-        //~^ ERROR E0007
-        //~| ERROR E0303
-        None => {},
-    }
-}
diff --git a/src/test/compile-fail/E0008.rs b/src/test/compile-fail/E0008.rs
deleted file mode 100644 (file)
index ba5720e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    match Some("hi".to_string()) {
-        Some(s) if s.len() == 0 => {},
-        //~^ ERROR E0008
-        _ => {},
-    }
-}
diff --git a/src/test/compile-fail/E0009.rs b/src/test/compile-fail/E0009.rs
deleted file mode 100644 (file)
index 02e2e80..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    struct X { x: (), }
-    let x = Some((X { x: () }, X { x: () }));
-    match x {
-        Some((y, ref z)) => {},
-        //~^ ERROR E0009
-        None => panic!()
-    }
-}
diff --git a/src/test/compile-fail/E0010.rs b/src/test/compile-fail/E0010.rs
deleted file mode 100644 (file)
index 66a9319..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(box_syntax)]
-#![allow(warnings)]
-
-const CON : Box<i32> = box 0; //~ ERROR E0010
-
-fn main() {}
diff --git a/src/test/compile-fail/E0017.rs b/src/test/compile-fail/E0017.rs
deleted file mode 100644 (file)
index c98c35a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-static X: i32 = 1;
-const C: i32 = 2;
-
-const CR: &'static mut i32 = &mut C; //~ ERROR E0017
-static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
-                                              //~| ERROR cannot borrow
-static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
-fn main() {}
diff --git a/src/test/compile-fail/E0023.rs b/src/test/compile-fail/E0023.rs
deleted file mode 100644 (file)
index 24032c5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Fruit {
-    Apple(String, String),
-    Pear(u32),
-}
-
-
-fn main() {
-    let x = Fruit::Apple(String::new(), String::new());
-    match x {
-        Fruit::Apple(a) => {}, //~ ERROR E0023
-        Fruit::Apple(a, b, c) => {}, //~ ERROR E0023
-        Fruit::Pear(1, 2) => {}, //~ ERROR E0023
-    }
-}
diff --git a/src/test/compile-fail/E0025.rs b/src/test/compile-fail/E0025.rs
deleted file mode 100644 (file)
index 81d0ea8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    a: u8,
-    b: u8,
-}
-
-fn main() {
-    let x = Foo { a:1, b:2 };
-    let Foo { a: x, a: y, b: 0 } = x;
-    //~^ ERROR field `a` bound multiple times in the pattern
-}
diff --git a/src/test/compile-fail/E0026.rs b/src/test/compile-fail/E0026.rs
deleted file mode 100644 (file)
index f8ad7b5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Thing {
-    x: u32,
-    y: u32
-}
-
-fn main() {
-    let thing = Thing { x: 0, y: 0 };
-    match thing {
-        Thing { x, y, z } => {}
-        //~^ ERROR struct `Thing` does not have a field named `z` [E0026]
-    }
-}
diff --git a/src/test/compile-fail/E0027.rs b/src/test/compile-fail/E0027.rs
deleted file mode 100644 (file)
index b63b0ab..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Dog {
-    name: String,
-    age: u32,
-}
-
-fn main() {
-    let d = Dog { name: "Rusty".to_string(), age: 8 };
-
-    match d {
-        Dog { age: x } => {}
-        //~^ ERROR pattern does not mention field `name`
-    }
-}
diff --git a/src/test/compile-fail/E0029.rs b/src/test/compile-fail/E0029.rs
deleted file mode 100644 (file)
index 80d215b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let s = "hoho";
-
-    match s {
-        "hello" ... "world" => {}
-        //~^ ERROR only char and numeric types are allowed in range patterns
-        //~| ERROR non-reference pattern used to match a reference
-        _ => {}
-    }
-}
diff --git a/src/test/compile-fail/E0030.rs b/src/test/compile-fail/E0030.rs
deleted file mode 100644 (file)
index ef3bded..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-fn main() {
-    match 5u32 {
-        1000 ... 5 => {}
-        //~^ ERROR lower range bound must be less than or equal to upper
-    }
-}
diff --git a/src/test/compile-fail/E0033.rs b/src/test/compile-fail/E0033.rs
deleted file mode 100644 (file)
index 3cdbb55..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait SomeTrait {
-    fn foo();
-}
-
-fn main() {
-    let trait_obj: &SomeTrait = SomeTrait;
-    //~^ ERROR expected value, found trait `SomeTrait`
-    //~| ERROR E0038
-    //~| method `foo` has no receiver
-
-    let &invalid = trait_obj;
-    //~^ ERROR E0033
-}
diff --git a/src/test/compile-fail/E0034.rs b/src/test/compile-fail/E0034.rs
deleted file mode 100644 (file)
index 6eebd4d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Test;
-
-trait Trait1 {
-    fn foo();
-}
-
-trait Trait2 {
-    fn foo();
-}
-
-impl Trait1 for Test {
-    fn foo() {}
-}
-
-impl Trait2 for Test {
-    fn foo() {}
-}
-
-fn main() {
-    Test::foo() //~ ERROR multiple applicable items in scope
-}
diff --git a/src/test/compile-fail/E0038.rs b/src/test/compile-fail/E0038.rs
deleted file mode 100644 (file)
index 8087928..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Trait {
-    fn foo(&self) -> Self;
-}
-
-fn call_foo(x: Box<Trait>) {
-    //~^ ERROR E0038
-    let y = x.foo();
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0040.rs b/src/test/compile-fail/E0040.rs
deleted file mode 100644 (file)
index 8385d68..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    x: i32,
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-        println!("kaboom");
-    }
-}
-
-fn main() {
-    let mut x = Foo { x: -7 };
-    x.drop();
-    //~^ ERROR E0040
-}
diff --git a/src/test/compile-fail/E0044.rs b/src/test/compile-fail/E0044.rs
deleted file mode 100644 (file)
index 48fe230..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern { fn some_func<T>(x: T); } //~ ERROR E0044
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0045.rs b/src/test/compile-fail/E0045.rs
deleted file mode 100644 (file)
index 57c639d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern "Rust" { fn foo(x: u8, ...); }   //~ ERROR E0045
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0049.rs b/src/test/compile-fail/E0049.rs
deleted file mode 100644 (file)
index 5867e11..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn foo<T: Default>(x: T) -> Self;
-}
-
-struct Bar;
-
-impl Foo for Bar {
-    fn foo(x: bool) -> Self { Bar } //~ ERROR E0049
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0050.rs b/src/test/compile-fail/E0050.rs
deleted file mode 100644 (file)
index 2ccc380..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn foo(&self, x: u8) -> bool;
-    fn bar(&self, x: u8, y: u8, z: u8);
-    fn less(&self);
-}
-
-struct Bar;
-
-impl Foo for Bar {
-    fn foo(&self) -> bool { true } //~ ERROR E0050
-    fn bar(&self) { } //~ ERROR E0050
-    fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0054.rs b/src/test/compile-fail/E0054.rs
deleted file mode 100644 (file)
index 158cd6f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = 5;
-    let x_is_nonzero = x as bool; //~ ERROR E0054
-}
diff --git a/src/test/compile-fail/E0055.rs b/src/test/compile-fail/E0055.rs
deleted file mode 100644 (file)
index 6e186b8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![recursion_limit="2"]
-struct Foo;
-
-impl Foo {
-    fn foo(&self) {}
-}
-
-fn main() {
-    let foo = Foo;
-    let ref_foo = &&Foo;
-    ref_foo.foo();
-    //~^ ERROR E0055
-}
diff --git a/src/test/compile-fail/E0057.rs b/src/test/compile-fail/E0057.rs
deleted file mode 100644 (file)
index 1fb5498..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let f = |x| x * 3;
-    let a = f(); //~ ERROR E0057
-    let b = f(4);
-    let c = f(2, 3); //~ ERROR E0057
-}
diff --git a/src/test/compile-fail/E0059.rs b/src/test/compile-fail/E0059.rs
deleted file mode 100644 (file)
index 4ae9b2f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(unboxed_closures)]
-
-fn foo<F: Fn<i32>>(f: F) -> F::Output { f(3) } //~ ERROR E0059
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0060.rs b/src/test/compile-fail/E0060.rs
deleted file mode 100644 (file)
index f450520..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern "C" {
-    fn printf(_: *const u8, ...) -> u32;
-}
-
-fn main() {
-    unsafe { printf(); }
-    //~^ ERROR E0060
-    //~| expected at least 1 parameter
-}
diff --git a/src/test/compile-fail/E0061.rs b/src/test/compile-fail/E0061.rs
deleted file mode 100644 (file)
index 221e18c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn f(a: u16, b: &str) {}
-
-fn f2(a: u16) {}
-
-fn main() {
-    f(0);
-    //~^ ERROR E0061
-    //~| expected 2 parameters
-
-    f2();
-    //~^ ERROR E0061
-    //~| expected 1 parameter
-}
diff --git a/src/test/compile-fail/E0062.rs b/src/test/compile-fail/E0062.rs
deleted file mode 100644 (file)
index 684c946..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    x: i32
-}
-
-fn main() {
-    let x = Foo {
-        x: 0,
-        x: 0,
-        //~^ ERROR E0062
-    };
-}
diff --git a/src/test/compile-fail/E0063.rs b/src/test/compile-fail/E0063.rs
deleted file mode 100644 (file)
index 0208aff..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-tidy-linelength
-
-struct SingleFoo {
-    x: i32
-}
-
-struct PluralFoo {
-    x: i32,
-    y: i32,
-    z: i32
-}
-
-struct TruncatedFoo {
-    a: i32,
-    b: i32,
-    x: i32,
-    y: i32,
-    z: i32
-}
-
-struct TruncatedPluralFoo {
-    a: i32,
-    b: i32,
-    c: i32,
-    x: i32,
-    y: i32,
-    z: i32
-}
-
-
-fn main() {
-    let w = SingleFoo { };
-    //~^ ERROR missing field `x` in initializer of `SingleFoo`
-    let x = PluralFoo {x: 1};
-    //~^ ERROR missing fields `y`, `z` in initializer of `PluralFoo`
-    let y = TruncatedFoo{x:1};
-    //~^ missing fields `a`, `b`, `y` and 1 other field in initializer of `TruncatedFoo`
-    let z = TruncatedPluralFoo{x:1};
-    //~^ ERROR missing fields `a`, `b`, `c` and 2 other fields in initializer of `TruncatedPluralFoo`
-}
diff --git a/src/test/compile-fail/E0067.rs b/src/test/compile-fail/E0067.rs
deleted file mode 100644 (file)
index a3fc30e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::collections::LinkedList;
-
-fn main() {
-    LinkedList::new() += 1; //~ ERROR E0368
-                            //~^ ERROR E0067
-}
diff --git a/src/test/compile-fail/E0069.rs b/src/test/compile-fail/E0069.rs
deleted file mode 100644 (file)
index a6a7898..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo() -> u8 {
-    return;
-    //~^ ERROR `return;` in a function whose return type is not `()`
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0070.rs b/src/test/compile-fail/E0070.rs
deleted file mode 100644 (file)
index ba66bd0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-const SOME_CONST : i32 = 12;
-
-fn some_other_func() {}
-
-fn some_function() {
-    SOME_CONST = 14; //~ ERROR E0070
-    1 = 3; //~ ERROR E0070
-    some_other_func() = 4; //~ ERROR E0070
-                           //~^ ERROR E0308
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0071.rs b/src/test/compile-fail/E0071.rs
deleted file mode 100644 (file)
index d71dc79..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Foo {}
-type FooAlias = Foo;
-
-fn main() {
-    let u = FooAlias { value: 0 };
-    //~^ ERROR expected struct, variant or union type, found enum `Foo` [E0071]
-}
diff --git a/src/test/compile-fail/E0075.rs b/src/test/compile-fail/E0075.rs
deleted file mode 100644 (file)
index d778390..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-
-#[repr(simd)]
-struct Bad; //~ ERROR E0075
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0076.rs b/src/test/compile-fail/E0076.rs
deleted file mode 100644 (file)
index b159cf1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-
-#[repr(simd)]
-struct Bad(u16, u32, u32);
-//~^ ERROR E0076
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0077.rs b/src/test/compile-fail/E0077.rs
deleted file mode 100644 (file)
index b074e90..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-
-#[repr(simd)]
-struct Bad(String); //~ ERROR E0077
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0080.rs b/src/test/compile-fail/E0080.rs
deleted file mode 100644 (file)
index 2f199c4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Enum {
-    X = (1 << 500), //~ ERROR E0080
-    //~| WARNING shift left with overflow
-    Y = (1 / 0) //~ ERROR E0080
-    //~| WARNING divide by zero
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0081.rs b/src/test/compile-fail/E0081.rs
deleted file mode 100644 (file)
index 3b57166..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Enum {
-    P = 3,
-    X = 3,
-    //~^ ERROR discriminant value `3isize` already exists
-    Y = 5
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0084.rs b/src/test/compile-fail/E0084.rs
deleted file mode 100644 (file)
index 2be206c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[repr(i32)] //~ ERROR: E0084
-enum Foo {}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0087.rs b/src/test/compile-fail/E0087.rs
deleted file mode 100644 (file)
index 6dc0886..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo() {}
-fn bar<T>() {}
-
-fn main() {
-    foo::<f64>(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087]
-
-    bar::<f64, u64>(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087]
-}
diff --git a/src/test/compile-fail/E0088.rs b/src/test/compile-fail/E0088.rs
deleted file mode 100644 (file)
index db84a4e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn f() {}
-fn g<'a>() -> &'a u8 { loop {} }
-
-fn main() {
-    f::<'static>(); //~ ERROR E0088
-    g::<'static, 'static>(); //~ ERROR E0088
-}
diff --git a/src/test/compile-fail/E0089.rs b/src/test/compile-fail/E0089.rs
deleted file mode 100644 (file)
index 21df9ab..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo<T, U>() {}
-
-fn main() {
-    foo::<f64>(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089]
-}
diff --git a/src/test/compile-fail/E0090.rs b/src/test/compile-fail/E0090.rs
deleted file mode 100644 (file)
index 13b2131..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo<'a: 'b, 'b: 'a>() {}
-
-fn main() {
-    foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090]
-}
diff --git a/src/test/compile-fail/E0091.rs b/src/test/compile-fail/E0091.rs
deleted file mode 100644 (file)
index da988db..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-type Foo<T> = u32; //~ ERROR E0091
-type Foo2<A, B> = Box<A>; //~ ERROR E0091
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0092.rs b/src/test/compile-fail/E0092.rs
deleted file mode 100644 (file)
index b08164a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(intrinsics)]
-extern "rust-intrinsic" {
-    fn atomic_foo(); //~ ERROR E0092
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0093.rs b/src/test/compile-fail/E0093.rs
deleted file mode 100644 (file)
index d84f9f6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(intrinsics)]
-extern "rust-intrinsic" {
-    fn foo();
-    //~^ ERROR E0093
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0094.rs b/src/test/compile-fail/E0094.rs
deleted file mode 100644 (file)
index 3a31874..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(intrinsics)]
-extern "rust-intrinsic" {
-    fn size_of<T, U>() -> usize; //~ ERROR E0094
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0106.rs b/src/test/compile-fail/E0106.rs
deleted file mode 100644 (file)
index 0674930..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    x: &bool,
-    //~^ ERROR E0106
-}
-enum Bar {
-    A(u8),
-    B(&bool),
-   //~^ ERROR E0106
-}
-type MyStr = &str;
-        //~^ ERROR E0106
-
-struct Baz<'a>(&'a str);
-struct Buzz<'a, 'b>(&'a str, &'b str);
-
-struct Quux {
-    baz: Baz,
-    //~^ ERROR E0106
-    //~| expected lifetime parameter
-    buzz: Buzz,
-    //~^ ERROR E0106
-    //~| expected 2 lifetime parameters
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0107.rs b/src/test/compile-fail/E0107.rs
deleted file mode 100644 (file)
index 16ebd3e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo<'a>(&'a str);
-struct Buzz<'a, 'b>(&'a str, &'b str);
-
-enum Bar {
-    A,
-    B,
-    C,
-}
-
-struct Baz<'a, 'b, 'c> {
-    buzz: Buzz<'a>,
-    //~^ ERROR E0107
-    //~| expected 2 lifetime parameters
-    bar: Bar<'a>,
-    //~^ ERROR E0107
-    //~| unexpected lifetime parameter
-    foo2: Foo<'a, 'b, 'c>,
-    //~^ ERROR E0107
-    //~| 2 unexpected lifetime parameters
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0109.rs b/src/test/compile-fail/E0109.rs
deleted file mode 100644 (file)
index 9fc4784..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-type X = u32<i32>; //~ ERROR E0109
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0110.rs b/src/test/compile-fail/E0110.rs
deleted file mode 100644 (file)
index fd169f4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-type X = u32<'static>; //~ ERROR E0110
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0116.rs b/src/test/compile-fail/E0116.rs
deleted file mode 100644 (file)
index cd7d8dc..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-impl Vec<u8> {}
-//~^ ERROR E0116
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0117.rs b/src/test/compile-fail/E0117.rs
deleted file mode 100644 (file)
index 982f875..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-impl Drop for u32 {} //~ ERROR E0117
-//~| ERROR the Drop trait may only be implemented on structures
-//~| implementing Drop requires a struct
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0118.rs b/src/test/compile-fail/E0118.rs
deleted file mode 100644 (file)
index d37ff34..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-impl (u8, u8) { //~ ERROR E0118
-    fn get_state(&self) -> String {
-        String::new()
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0119.rs b/src/test/compile-fail/E0119.rs
deleted file mode 100644 (file)
index 9528631..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait MyTrait {
-    fn get(&self) -> usize;
-}
-
-impl<T> MyTrait for T {
-    fn get(&self) -> usize { 0 }
-}
-
-struct Foo {
-    value: usize
-}
-
-impl MyTrait for Foo { //~ ERROR E0119
-    fn get(&self) -> usize { self.value }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0120.rs b/src/test/compile-fail/E0120.rs
deleted file mode 100644 (file)
index 8d09b87..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait MyTrait { fn foo() {} }
-
-impl Drop for MyTrait {
-              //~^ ERROR E0120
-    fn drop(&mut self) {}
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0121.rs b/src/test/compile-fail/E0121.rs
deleted file mode 100644 (file)
index b26b5f4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo() -> _ { 5 } //~ ERROR E0121
-
-static BAR: _ = "test"; //~ ERROR E0121
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0124.rs b/src/test/compile-fail/E0124.rs
deleted file mode 100644 (file)
index 3ef20c6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    field1: i32,
-    field1: i32,
-    //~^ ERROR field `field1` is already declared [E0124]
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0128.rs b/src/test/compile-fail/E0128.rs
deleted file mode 100644 (file)
index 3707101..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo<T=U, U=()> { //~ ERROR E0128
-    field1: T,
-    field2: U,
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0130.rs b/src/test/compile-fail/E0130.rs
deleted file mode 100644 (file)
index d11b59c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern {
-    fn foo((a, b): (u32, u32));
-    //~^ ERROR E0130
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0131.rs b/src/test/compile-fail/E0131.rs
deleted file mode 100644 (file)
index c7e31ed..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main<T>() {
-    //~^ ERROR E0131
-}
diff --git a/src/test/compile-fail/E0132.rs b/src/test/compile-fail/E0132.rs
deleted file mode 100644 (file)
index 25ccb34..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(start)]
-
-#[start]
-fn f< T >() {} //~ ERROR E0132
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0133.rs b/src/test/compile-fail/E0133.rs
deleted file mode 100644 (file)
index 2e54f65..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-unsafe fn f() { return; }
-
-fn main() {
-    f();
-    //~^ ERROR E0133
-}
diff --git a/src/test/compile-fail/E0137.rs b/src/test/compile-fail/E0137.rs
deleted file mode 100644 (file)
index 067ebcc..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(main)]
-
-#[main]
-fn foo() {}
-
-#[main]
-fn f() {}
-//~^ ERROR E0137
diff --git a/src/test/compile-fail/E0138.rs b/src/test/compile-fail/E0138.rs
deleted file mode 100644 (file)
index 856616c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(start)]
-
-#[start]
-fn foo(argc: isize, argv: *const *const u8) -> isize { 0 }
-
-#[start]
-fn f(argc: isize, argv: *const *const u8) -> isize { 0 }
-//~^ ERROR E0138
diff --git a/src/test/compile-fail/E0152.rs b/src/test/compile-fail/E0152.rs
deleted file mode 100644 (file)
index ae501b9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(lang_items)]
-
-#[lang = "panic_fmt"]
-struct Foo; //~ ERROR E0152
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0161.rs b/src/test/compile-fail/E0161.rs
deleted file mode 100644 (file)
index 81adf90..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(box_syntax)]
-
-fn main() {
-    let _x: Box<str> = box *"hello"; //~ ERROR E0161
-                                     //~^ ERROR E0507
-}
diff --git a/src/test/compile-fail/E0162.rs b/src/test/compile-fail/E0162.rs
deleted file mode 100644 (file)
index e13b0af..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Irrefutable(i32);
-
-fn main() {
-    let irr = Irrefutable(0);
-    if let Irrefutable(x) = irr { //~ ERROR E0162
-        println!("{}", x);
-    }
-}
diff --git a/src/test/compile-fail/E0164.rs b/src/test/compile-fail/E0164.rs
deleted file mode 100644 (file)
index a7f10dd..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-enum Foo {}
-
-impl Foo {
-    const B: u8 = 0;
-}
-
-fn bar(foo: Foo) -> u32 {
-    match foo {
-        Foo::B(i) => i, //~ ERROR E0164
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0165.rs b/src/test/compile-fail/E0165.rs
deleted file mode 100644 (file)
index 142635f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Irrefutable(i32);
-
-fn main() {
-    let irr = Irrefutable(0);
-    while let Irrefutable(x) = irr { //~ ERROR E0165
-                                     //~| irrefutable pattern
-        // ...
-    }
-}
diff --git a/src/test/compile-fail/E0184.rs b/src/test/compile-fail/E0184.rs
deleted file mode 100644 (file)
index 5d72d00..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[derive(Copy)] //~ ERROR E0184
-struct Foo;
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0185.rs b/src/test/compile-fail/E0185.rs
deleted file mode 100644 (file)
index 0cd3d00..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn foo();
-    //~^ NOTE trait method declared without `&self`
-}
-
-struct Bar;
-
-impl Foo for Bar {
-    fn foo(&self) {}
-    //~^ ERROR E0185
-    //~| NOTE `&self` used in impl
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0186.rs b/src/test/compile-fail/E0186.rs
deleted file mode 100644 (file)
index 55a3490..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn foo(&self); //~ `&self` used in trait
-}
-
-struct Bar;
-
-impl Foo for Bar {
-    fn foo() {} //~ ERROR E0186
-    //~^ expected `&self` in impl
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0191.rs b/src/test/compile-fail/E0191.rs
deleted file mode 100644 (file)
index 489ebb0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Trait {
-    type Bar;
-}
-
-type Foo = Trait; //~ ERROR E0191
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0192.rs b/src/test/compile-fail/E0192.rs
deleted file mode 100644 (file)
index 92f5876..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(optin_builtin_traits)]
-
-trait Trait {
-    type Bar;
-}
-
-struct Foo;
-
-impl !Trait for Foo { } //~ ERROR E0192
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0194.rs b/src/test/compile-fail/E0194.rs
deleted file mode 100644 (file)
index 17e0751..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo<T> {
-    fn do_something(&self) -> T;
-    fn do_something_else<T: Clone>(&self, bar: T);
-    //~^ ERROR E0194
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0195.rs b/src/test/compile-fail/E0195.rs
deleted file mode 100644 (file)
index 4f4d7ce..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Trait {
-    fn bar<'a,'b:'a>(x: &'a str, y: &'b str);
-    //~^ NOTE lifetimes in impl do not match this method in trait
-}
-
-struct Foo;
-
-impl Trait for Foo {
-    fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195
-    //~^ NOTE lifetimes do not match method in trait
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0197.rs b/src/test/compile-fail/E0197.rs
deleted file mode 100644 (file)
index f25fa9b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo;
-
-unsafe impl Foo { } //~ ERROR E0197
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0198.rs b/src/test/compile-fail/E0198.rs
deleted file mode 100644 (file)
index 1a779a4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(optin_builtin_traits)]
-
-struct Foo;
-
-unsafe impl !Send for Foo { } //~ ERROR E0198
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0199.rs b/src/test/compile-fail/E0199.rs
deleted file mode 100644 (file)
index 1a5cd19..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(optin_builtin_traits)]
-
-struct Foo;
-
-trait Bar { }
-unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199]
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0200.rs b/src/test/compile-fail/E0200.rs
deleted file mode 100644 (file)
index 6bfea0e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo;
-
-unsafe trait Bar { }
-
-impl Bar for Foo { } //~ ERROR E0200
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0201.rs b/src/test/compile-fail/E0201.rs
deleted file mode 100644 (file)
index ff6cb55..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo(u8);
-
-impl Foo {
-    fn bar(&self) -> bool { self.0 > 5 }
-    fn bar() {} //~ ERROR E0201
-}
-
-trait Baz {
-    type Quux;
-    fn baz(&self) -> bool;
-}
-
-impl Baz for Foo {
-    type Quux = u32;
-
-    fn baz(&self) -> bool { true }
-    fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201
-    type Quux = u32; //~ ERROR E0201
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0206.rs b/src/test/compile-fail/E0206.rs
deleted file mode 100644 (file)
index da0370b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-type Foo = i32;
-
-impl Copy for Foo { }
-//~^ ERROR the trait `Copy` may not be implemented for this type
-//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
-
-#[derive(Copy, Clone)]
-struct Bar;
-
-impl Copy for &'static Bar { }
-//~^ ERROR the trait `Copy` may not be implemented for this type
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0207.rs b/src/test/compile-fail/E0207.rs
deleted file mode 100644 (file)
index bd87dba..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo;
-
-impl<T: Default> Foo { //~ ERROR E0207
-    fn get(&self) -> T {
-        <T as Default>::default()
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0214.rs b/src/test/compile-fail/E0214.rs
deleted file mode 100644 (file)
index 2b09039..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let v: Vec(&str) = vec!["foo"];
-    //~^ ERROR E0214
-}
diff --git a/src/test/compile-fail/E0220.rs b/src/test/compile-fail/E0220.rs
deleted file mode 100644 (file)
index 2866ffc..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Trait {
-    type Bar;
-}
-
-type Foo = Trait<F=i32>; //~ ERROR E0220
-                         //~| ERROR E0191
-fn main() {
-}
diff --git a/src/test/compile-fail/E0221.rs b/src/test/compile-fail/E0221.rs
deleted file mode 100644 (file)
index 9909246..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait T1 {}
-trait T2 {}
-
-trait Foo {
-    type A: T1;
-}
-
-trait Bar : Foo {
-    type A: T2;
-    fn do_something() {
-        let _: Self::A;
-        //~^ ERROR E0221
-    }
-}
-
-trait T3 {}
-
-trait My : std::str::FromStr {
-    type Err: T3;
-    fn test() {
-        let _: Self::Err;
-        //~^ ERROR E0221
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0223.rs b/src/test/compile-fail/E0223.rs
deleted file mode 100644 (file)
index 0683197..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait MyTrait { type X; }
-
-fn main() {
-    let foo: MyTrait::X;
-    //~^ ERROR ambiguous associated type
-}
diff --git a/src/test/compile-fail/E0225.rs b/src/test/compile-fail/E0225.rs
deleted file mode 100644 (file)
index 6c77443..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let _: Box<std::io::Read + std::io::Write>;
-    //~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
-}
diff --git a/src/test/compile-fail/E0229.rs b/src/test/compile-fail/E0229.rs
deleted file mode 100644 (file)
index b70fb09..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Foo {
-    type A;
-    fn boo(&self) -> <Self as Foo>::A;
-}
-
-struct Bar;
-
-impl Foo for isize {
-    type A = usize;
-    fn boo(&self) -> usize { 42 }
-}
-
-fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
-//~^ ERROR associated type bindings are not allowed here [E0229]
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0232.rs b/src/test/compile-fail/E0232.rs
deleted file mode 100644 (file)
index 04657c6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(on_unimplemented)]
-
-#[rustc_on_unimplemented]
-//~^ ERROR E0232
-trait Bar {}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0243.rs b/src/test/compile-fail/E0243.rs
deleted file mode 100644 (file)
index 615ce0b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo<T> { x: T }
-struct Bar { x: Foo }
-                //~^ ERROR wrong number of type arguments: expected 1, found 0 [E0243]
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0244.rs b/src/test/compile-fail/E0244.rs
deleted file mode 100644 (file)
index 9a78b31..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo { x: bool }
-struct Bar<S, T> { x: Foo<S, T> }
-                      //~^ ERROR wrong number of type arguments: expected 0, found 2 [E0244]
-
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0252.rs b/src/test/compile-fail/E0252.rs
deleted file mode 100644 (file)
index 6b353c8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use foo::baz;
-use bar::baz; //~ ERROR E0252
-
-mod foo {
-    pub struct baz;
-}
-
-mod bar {
-    pub mod baz {}
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0253.rs b/src/test/compile-fail/E0253.rs
deleted file mode 100644 (file)
index 186d901..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod foo {
-    pub trait MyTrait {
-        fn do_something();
-    }
-}
-
-use foo::MyTrait::do_something;
-    //~^ ERROR E0253
-
-fn main() {}
diff --git a/src/test/compile-fail/E0254.rs b/src/test/compile-fail/E0254.rs
deleted file mode 100644 (file)
index 46c74fe..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(alloc)]
-#![allow(unused_extern_crates)]
-
-extern crate alloc;
-
-mod foo {
-    pub trait alloc {
-        fn do_something();
-    }
-}
-
-use foo::alloc;
-//~^ ERROR E0254
-
-fn main() {}
diff --git a/src/test/compile-fail/E0255.rs b/src/test/compile-fail/E0255.rs
deleted file mode 100644 (file)
index e05c6be..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use bar::foo;
-
-fn foo() {} //~ ERROR E0255
-
-mod bar {
-     pub fn foo() {}
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0259.rs b/src/test/compile-fail/E0259.rs
deleted file mode 100644 (file)
index 5a47541..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(alloc, libc)]
-#![allow(unused_extern_crates)]
-
-extern crate alloc;
-
-extern crate libc as alloc;
-//~^ ERROR E0259
-
-fn main() {}
diff --git a/src/test/compile-fail/E0260.rs b/src/test/compile-fail/E0260.rs
deleted file mode 100644 (file)
index 1b01bb1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(alloc)]
-#![allow(unused_extern_crates)]
-
-extern crate alloc;
-
-mod alloc {
-//~^ ERROR the name `alloc` is defined multiple times [E0260]
-    pub trait MyTrait {
-        fn do_something();
-    }
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0261.rs b/src/test/compile-fail/E0261.rs
deleted file mode 100644 (file)
index 558c1c3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo(x: &'a str) { } //~ ERROR E0261
-                       //~| undeclared lifetime
-
-struct Foo {
-    x: &'a str, //~ ERROR E0261
-                //~| undeclared lifetime
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0262.rs b/src/test/compile-fail/E0262.rs
deleted file mode 100644 (file)
index 41b6aca..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo<'static>(x: &'static str) { } //~ ERROR E0262
-                                     //~| 'static is a reserved lifetime name
-
-fn main() {}
diff --git a/src/test/compile-fail/E0263.rs b/src/test/compile-fail/E0263.rs
deleted file mode 100644 (file)
index 722f1c2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) {
-    //~^ ERROR E0263
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0264.rs b/src/test/compile-fail/E0264.rs
deleted file mode 100644 (file)
index 9233297..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(lang_items)]
-
-extern "C" {
-    #[lang = "cake"]
-    fn cake(); //~ ERROR E0264
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0267.rs b/src/test/compile-fail/E0267.rs
deleted file mode 100644 (file)
index 6287256..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let w = || { break; }; //~ ERROR E0267
-}
diff --git a/src/test/compile-fail/E0268.rs b/src/test/compile-fail/E0268.rs
deleted file mode 100644 (file)
index 41e88e2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    break; //~ ERROR E0268
-}
diff --git a/src/test/compile-fail/E0271.rs b/src/test/compile-fail/E0271.rs
deleted file mode 100644 (file)
index d322c8b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Trait { type AssociatedType; }
-
-fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
-    println!("in foo");
-}
-
-impl Trait for i8 { type AssociatedType = &'static str; }
-
-fn main() {
-    foo(3_i8); //~ ERROR E0271
-}
diff --git a/src/test/compile-fail/E0275.rs b/src/test/compile-fail/E0275.rs
deleted file mode 100644 (file)
index 8dfd1d9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {}
-
-struct Bar<T>(T);
-
-impl<T> Foo for T where Bar<T>: Foo {} //~ ERROR E0275
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0276.rs b/src/test/compile-fail/E0276.rs
deleted file mode 100644 (file)
index 62e43b0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn foo<T>(x: T);
-}
-
-impl Foo for bool {
-    fn foo<T>(x: T) where T: Copy {} //~ ERROR E0276
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0277-2.rs b/src/test/compile-fail/E0277-2.rs
deleted file mode 100644 (file)
index 4d1c500..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    bar: Bar
-}
-
-struct Bar {
-    baz: Baz
-}
-
-struct Baz {
-    x: *const u8
-}
-
-fn is_send<T: Send>() { }
-
-fn main() {
-    is_send::<Foo>();
-    //~^ ERROR the trait bound `*const u8: std::marker::Send` is not satisfied in `Foo`
-}
diff --git a/src/test/compile-fail/E0277.rs b/src/test/compile-fail/E0277.rs
deleted file mode 100644 (file)
index b29e435..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-cloudabi no std::path
-
-use std::path::Path;
-
-trait Foo {
-    fn bar(&self);
-}
-
-fn some_func<T: Foo>(foo: T) {
-    foo.bar();
-}
-
-fn f(p: Path) { }
-//~^ ERROR the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path`
-
-fn main() {
-    some_func(5i32);
-    //~^ ERROR the trait bound `i32: Foo` is not satisfied
-}
diff --git a/src/test/compile-fail/E0282.rs b/src/test/compile-fail/E0282.rs
deleted file mode 100644 (file)
index dfc7026..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = "hello".chars().rev().collect(); //~ ERROR E0282
-}
diff --git a/src/test/compile-fail/E0283.rs b/src/test/compile-fail/E0283.rs
deleted file mode 100644 (file)
index 844c47f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Generator {
-    fn create() -> u32;
-}
-
-struct Impl;
-
-impl Generator for Impl {
-    fn create() -> u32 { 1 }
-}
-
-struct AnotherImpl;
-
-impl Generator for AnotherImpl {
-    fn create() -> u32 { 2 }
-}
-
-fn main() {
-    let cont: u32 = Generator::create(); //~ ERROR E0283
-}
diff --git a/src/test/compile-fail/E0296.rs b/src/test/compile-fail/E0296.rs
deleted file mode 100644 (file)
index 562fd00..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![recursion_limit] //~ ERROR E0296
-
-fn main() {}
diff --git a/src/test/compile-fail/E0297.rs b/src/test/compile-fail/E0297.rs
deleted file mode 100644 (file)
index afe4444..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let xs : Vec<Option<i32>> = vec![Some(1), None];
-
-    for Some(x) in xs {}
-    //~^ ERROR E0005
-}
diff --git a/src/test/compile-fail/E0301.rs b/src/test/compile-fail/E0301.rs
deleted file mode 100644 (file)
index 06e9828..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    match Some(()) {
-        None => { },
-        option if option.take().is_none() => {}, //~ ERROR E0301
-        Some(_) => { }
-    }
-}
diff --git a/src/test/compile-fail/E0302.rs b/src/test/compile-fail/E0302.rs
deleted file mode 100644 (file)
index 6a5ad40..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    match Some(()) {
-        None => { },
-        option if { option = None; false } => { }, //~ ERROR E0302
-        Some(_) => { }
-    }
-}
diff --git a/src/test/compile-fail/E0303.rs b/src/test/compile-fail/E0303.rs
deleted file mode 100644 (file)
index 6027414..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    match Some("hi".to_string()) {
-        ref op_string_ref @ Some(s) => {},
-        //~^ ERROR pattern bindings are not allowed after an `@` [E0303]
-        //~| ERROR E0009
-        None => {},
-    }
-}
diff --git a/src/test/compile-fail/E0308-4.rs b/src/test/compile-fail/E0308-4.rs
deleted file mode 100644 (file)
index bb4cd14..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = 1u8;
-    match x {
-        0u8...3i8 => (), //~ ERROR E0308
-        _ => ()
-    }
-}
diff --git a/src/test/compile-fail/E0308.rs b/src/test/compile-fail/E0308.rs
deleted file mode 100644 (file)
index 078f1d3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(intrinsics)]
-
-extern "rust-intrinsic" {
-    fn size_of<T>(); //~ ERROR E0308
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0365.rs b/src/test/compile-fail/E0365.rs
deleted file mode 100644 (file)
index 18a72b0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod foo {
-    pub const X: u32 = 1;
-}
-
-pub use foo as foo2;
-//~^ ERROR `foo` is private, and cannot be re-exported [E0365]
-
-fn main() {}
diff --git a/src/test/compile-fail/E0370.rs b/src/test/compile-fail/E0370.rs
deleted file mode 100644 (file)
index cafe26c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![allow(dead_code)]
-
-#[deny(overflowing_literals)]
-#[repr(i64)]
-enum Foo {
-    X = 0x7fffffffffffffff,
-    Y, //~ ERROR E0370
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0374.rs b/src/test/compile-fail/E0374.rs
deleted file mode 100644 (file)
index 6c4782d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(coerce_unsized)]
-use std::ops::CoerceUnsized;
-
-struct Foo<T: ?Sized> {
-    a: i32,
-}
-
-impl<T, U> CoerceUnsized<Foo<U>> for Foo<T> //~ ERROR E0374
-    where T: CoerceUnsized<U> {}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0375.rs b/src/test/compile-fail/E0375.rs
deleted file mode 100644 (file)
index 094ed35..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-tidy-linelength
-
-#![feature(coerce_unsized)]
-use std::ops::CoerceUnsized;
-
-struct Foo<T: ?Sized, U: ?Sized> {
-    a: i32,
-    b: T,
-    c: U,
-}
-
-impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
-//~^ ERROR E0375
-
-fn main() {}
diff --git a/src/test/compile-fail/E0376.rs b/src/test/compile-fail/E0376.rs
deleted file mode 100644 (file)
index 65be358..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(coerce_unsized)]
-use std::ops::CoerceUnsized;
-
-struct Foo<T: ?Sized> {
-    a: T,
-}
-
-impl<T, U> CoerceUnsized<U> for Foo<T> {} //~ ERROR E0376
-
-fn main() {}
diff --git a/src/test/compile-fail/E0388.rs b/src/test/compile-fail/E0388.rs
deleted file mode 100644 (file)
index c002bad..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-static X: i32 = 1;
-const C: i32 = 2;
-
-const CR: &'static mut i32 = &mut C; //~ ERROR E0017
-static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
-                                              //~| ERROR cannot borrow
-static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
-
-fn main() {}
diff --git a/src/test/compile-fail/E0389.rs b/src/test/compile-fail/E0389.rs
deleted file mode 100644 (file)
index 445831b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct FancyNum {
-    num: u8,
-}
-
-fn main() {
-    let mut fancy = FancyNum{ num: 5 };
-    let fancy_ref = &(&mut fancy);
-    fancy_ref.num = 6; //~ ERROR E0389
-    println!("{}", fancy_ref.num);
-}
diff --git a/src/test/compile-fail/E0390.rs b/src/test/compile-fail/E0390.rs
deleted file mode 100644 (file)
index cd530db..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    x: i32
-}
-
-impl *mut Foo {} //~ ERROR E0390
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0392.rs b/src/test/compile-fail/E0392.rs
deleted file mode 100644 (file)
index 4c3efcf..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Foo<T> { Bar } //~ ERROR E0392
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0393.rs b/src/test/compile-fail/E0393.rs
deleted file mode 100644 (file)
index 9165bc2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait A<T=Self> {}
-
-fn together_we_will_rule_the_galaxy(son: &A) {}
-//~^ ERROR E0393
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0394.rs b/src/test/compile-fail/E0394.rs
deleted file mode 100644 (file)
index dae8e14..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![allow(warnings)]
-
-static A: u32 = 0;
-static B: u32 = A;
-//~^ ERROR E0394
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0395.rs b/src/test/compile-fail/E0395.rs
deleted file mode 100644 (file)
index 00008ea..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-static FOO: i32 = 42;
-static BAR: i32 = 42;
-
-static BAZ: bool = { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR E0395
-fn main() {
-}
diff --git a/src/test/compile-fail/E0396.rs b/src/test/compile-fail/E0396.rs
deleted file mode 100644 (file)
index 7f34acd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-const REG_ADDR: *const u8 = 0x5f3759df as *const u8;
-
-const VALUE: u8 = unsafe { *REG_ADDR }; //~ ERROR E0396
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0401.rs b/src/test/compile-fail/E0401.rs
deleted file mode 100644 (file)
index 09bc950..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo<T>(x: T) {
-    fn bar(y: T) { //~ ERROR E0401
-    }
-    bar(x);
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0403.rs b/src/test/compile-fail/E0403.rs
deleted file mode 100644 (file)
index 6a68013..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo<T, T>(s: T, u: T) {} //~ ERROR E0403
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0404.rs b/src/test/compile-fail/E0404.rs
deleted file mode 100644 (file)
index 1c088a7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo;
-struct Bar;
-
-impl Foo for Bar {} //~ ERROR E0404
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0405.rs b/src/test/compile-fail/E0405.rs
deleted file mode 100644 (file)
index 45d4b21..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo;
-
-impl SomeTrait for Foo {} //~ ERROR E0405
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0407.rs b/src/test/compile-fail/E0407.rs
deleted file mode 100644 (file)
index 41d8b45..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn a();
-}
-
-struct Bar;
-
-impl Foo for Bar {
-    fn a() {}
-    fn b() {}
-    //~^ ERROR E0407
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0408.rs b/src/test/compile-fail/E0408.rs
deleted file mode 100644 (file)
index 8ddeb20..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = Some(0);
-
-    match x {
-        Some(y) | None => {} //~  ERROR variable `y` is not bound in all patterns
-        _ => ()
-    }
-}
diff --git a/src/test/compile-fail/E0411.rs b/src/test/compile-fail/E0411.rs
deleted file mode 100644 (file)
index 187986f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    <Self>::foo; //~ ERROR E0411
-}
diff --git a/src/test/compile-fail/E0412.rs b/src/test/compile-fail/E0412.rs
deleted file mode 100644 (file)
index f62901c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-impl Something {} //~ ERROR E0412
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0415.rs b/src/test/compile-fail/E0415.rs
deleted file mode 100644 (file)
index 2a5f0d3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo(f: i32, f: i32) {} //~ ERROR E0415
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0416.rs b/src/test/compile-fail/E0416.rs
deleted file mode 100644 (file)
index 91077ab..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    match (1, 2) {
-        (x, x) => {} //~ ERROR E0416
-    }
-}
diff --git a/src/test/compile-fail/E0423.rs b/src/test/compile-fail/E0423.rs
deleted file mode 100644 (file)
index f5fea77..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main () {
-    struct Foo { a: bool };
-
-    let f = Foo(); //~ ERROR E0423
-}
diff --git a/src/test/compile-fail/E0424.rs b/src/test/compile-fail/E0424.rs
deleted file mode 100644 (file)
index 445d0c5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo;
-
-impl Foo {
-    fn bar(self) {}
-
-    fn foo() {
-        self.bar(); //~ ERROR E0424
-    }
-}
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0425.rs b/src/test/compile-fail/E0425.rs
deleted file mode 100644 (file)
index 3786282..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn bar() {
-        elf; //~ ERROR E0425
-    }
-}
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0426.rs b/src/test/compile-fail/E0426.rs
deleted file mode 100644 (file)
index d6261d3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main () {
-    loop {
-        break 'a;
-        //~^ ERROR E0426
-    }
-}
diff --git a/src/test/compile-fail/E0428.rs b/src/test/compile-fail/E0428.rs
deleted file mode 100644 (file)
index 3c709f3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Bar; //~ previous definition of the type `Bar` here
-struct Bar; //~ ERROR E0428
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0429.rs b/src/test/compile-fail/E0429.rs
deleted file mode 100644 (file)
index f1cad20..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::fmt::self; //~ ERROR E0429
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0430.rs b/src/test/compile-fail/E0430.rs
deleted file mode 100644 (file)
index 992876d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::fmt::{self, self}; //~ ERROR E0430
-                            //~^ ERROR E0252
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0431.rs b/src/test/compile-fail/E0431.rs
deleted file mode 100644 (file)
index 09ddc1e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use {self}; //~ ERROR E0431
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0432.rs b/src/test/compile-fail/E0432.rs
deleted file mode 100644 (file)
index 08d699e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use something::Foo; //~ ERROR E0432
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0433.rs b/src/test/compile-fail/E0433.rs
deleted file mode 100644 (file)
index 916d622..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main () {
-    let map = HashMap::new(); //~ ERROR E0433
-}
diff --git a/src/test/compile-fail/E0434.rs b/src/test/compile-fail/E0434.rs
deleted file mode 100644 (file)
index 747d9f7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo() {
-    let y = 5;
-    fn bar() -> u32 {
-        y //~ ERROR E0434
-    }
-}
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0435.rs b/src/test/compile-fail/E0435.rs
deleted file mode 100644 (file)
index 5246fda..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main () {
-    let foo = 42u32;
-    let _: [u8; foo]; //~ ERROR E0435
-}
diff --git a/src/test/compile-fail/E0437.rs b/src/test/compile-fail/E0437.rs
deleted file mode 100644 (file)
index 7440a82..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {}
-
-impl Foo for i32 {
-    type Bar = bool; //~ ERROR E0437
-}
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0438.rs b/src/test/compile-fail/E0438.rs
deleted file mode 100644 (file)
index 61d2513..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-trait Bar {}
-
-impl Bar for i32 {
-    const BAR: bool = true; //~ ERROR E0438
-}
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0439.rs b/src/test/compile-fail/E0439.rs
deleted file mode 100644 (file)
index 5244343..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(platform_intrinsics)]
-
-extern "platform-intrinsic" {
-    fn simd_shuffle<A,B>(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439
-}
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0440.rs b/src/test/compile-fail/E0440.rs
deleted file mode 100644 (file)
index 04e7584..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-#![feature(platform_intrinsics)]
-
-#[repr(simd)]
-struct f64x2(f64, f64);
-
-extern "platform-intrinsic" {
-    fn x86_mm_movemask_pd<T>(x: f64x2) -> i32; //~ ERROR E0440
-}
-
-fn main () {
-}
diff --git a/src/test/compile-fail/E0441.rs b/src/test/compile-fail/E0441.rs
deleted file mode 100644 (file)
index 967ff64..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-#![feature(platform_intrinsics)]
-
-#[repr(simd)]
-struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
-
-extern "platform-intrinsic" {
-    fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0442.rs b/src/test/compile-fail/E0442.rs
deleted file mode 100644 (file)
index ddd9270..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-#![feature(platform_intrinsics)]
-
-#[repr(simd)]
-struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
-             i8, i8, i8, i8, i8, i8, i8, i8);
-#[repr(simd)]
-struct i32x4(i32, i32, i32, i32);
-#[repr(simd)]
-struct i64x2(i64, i64);
-
-extern "platform-intrinsic" {
-    fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
-    //~^ ERROR E0442
-    //~| ERROR E0442
-    //~| ERROR E0442
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0443.rs b/src/test/compile-fail/E0443.rs
deleted file mode 100644 (file)
index 24d1ee0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-#![feature(platform_intrinsics)]
-
-#[repr(simd)]
-struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
-#[repr(simd)]
-struct i64x8(i64, i64, i64, i64, i64, i64, i64, i64);
-
-extern "platform-intrinsic" {
-    fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0444.rs b/src/test/compile-fail/E0444.rs
deleted file mode 100644 (file)
index a424a3c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(repr_simd)]
-#![feature(platform_intrinsics)]
-
-#[repr(simd)]
-struct f64x2(f64, f64);
-
-extern "platform-intrinsic" {
-    fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0445.rs b/src/test/compile-fail/E0445.rs
deleted file mode 100644 (file)
index bca1b52..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    fn dummy(&self) { }
-}
-
-pub trait Bar : Foo {}
-//~^ ERROR private trait `Foo` in public interface [E0445]
-//~| NOTE can't leak private trait
-pub struct Bar2<T: Foo>(pub T);
-//~^ ERROR private trait `Foo` in public interface [E0445]
-//~| NOTE can't leak private trait
-pub fn foo<T: Foo> (t: T) {}
-//~^ ERROR private trait `Foo` in public interface [E0445]
-//~| NOTE can't leak private trait
-
-fn main() {}
diff --git a/src/test/compile-fail/E0446.rs b/src/test/compile-fail/E0446.rs
deleted file mode 100644 (file)
index c576661..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod Foo {
-    struct Bar(u32);
-
-    pub fn bar() -> Bar { //~ ERROR E0446
-        Bar(0)
-    }
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0449.rs b/src/test/compile-fail/E0449.rs
deleted file mode 100644 (file)
index ac365db..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Bar;
-
-trait Foo {
-    fn foo();
-}
-
-pub impl Bar {} //~ ERROR E0449
-
-pub impl Foo for Bar { //~ ERROR E0449
-    pub fn foo() {} //~ ERROR E0449
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0451.rs b/src/test/compile-fail/E0451.rs
deleted file mode 100644 (file)
index af4e7d6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod Bar {
-    pub struct Foo {
-        pub a: isize,
-        b: isize,
-    }
-
-    pub struct FooTuple (
-        pub isize,
-        isize,
-    );
-}
-
-fn pat_match(foo: Bar::Foo) {
-    let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451
-}
-
-fn main() {
-    let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
-}
diff --git a/src/test/compile-fail/E0452.rs b/src/test/compile-fail/E0452.rs
deleted file mode 100644 (file)
index 1665bbd..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![allow(foo = "")] //~ ERROR E0452
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0453.rs b/src/test/compile-fail/E0453.rs
deleted file mode 100644 (file)
index 8e51b84..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![forbid(non_snake_case)]
-
-#[allow(non_snake_case)]
-//~^ ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
-fn main() {
-}
diff --git a/src/test/compile-fail/E0454.rs b/src/test/compile-fail/E0454.rs
deleted file mode 100644 (file)
index afd0f5f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[link(name = "")] extern {}
-//~^ ERROR E0454
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0458.rs b/src/test/compile-fail/E0458.rs
deleted file mode 100644 (file)
index fea27ef..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458
-                                              //~| ERROR E0459
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0459.rs b/src/test/compile-fail/E0459.rs
deleted file mode 100644 (file)
index dc7ac71..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[link(kind = "dylib")] extern {} //~ ERROR E0459
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0463.rs b/src/test/compile-fail/E0463.rs
deleted file mode 100644 (file)
index aae8397..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(plugin)]
-#![plugin(cookie_monster)]
-//~^ ERROR E0463
-extern crate cake_is_a_lie;
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0478.rs b/src/test/compile-fail/E0478.rs
deleted file mode 100644 (file)
index 8eb4003..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Wedding<'t>: 't { }
-
-struct Prince<'kiss, 'SnowWhite> {
-    child: Box<Wedding<'kiss> + 'SnowWhite>, //~ ERROR E0478
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0492.rs b/src/test/compile-fail/E0492.rs
deleted file mode 100644 (file)
index 8e4964c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT};
-
-const A: AtomicUsize = ATOMIC_USIZE_INIT;
-static B: &'static AtomicUsize = &A; //~ ERROR E0492
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0494.rs b/src/test/compile-fail/E0494.rs
deleted file mode 100644 (file)
index 5f8632a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    a: u32
-}
-
-static S : Foo = Foo { a : 0 };
-static A : &'static u32 = &S.a; //~ ERROR E0494
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0496.rs b/src/test/compile-fail/E0496.rs
deleted file mode 100644 (file)
index 4ca3cd9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo<'a> {
-    a: &'a i32,
-}
-
-impl<'a> Foo<'a> {
-    fn f<'a>(x: &'a i32) { //~ ERROR E0496
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0499.rs b/src/test/compile-fail/E0499.rs
deleted file mode 100644 (file)
index 9a64bfe..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let mut i = 0;
-    let mut x = &mut i;
-    let mut a = &mut i; //~ ERROR E0499
-}
diff --git a/src/test/compile-fail/E0502.rs b/src/test/compile-fail/E0502.rs
deleted file mode 100644 (file)
index fce8513..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn bar(x: &mut i32) {}
-fn foo(a: &mut i32) {
-    let ref y = a;
-    bar(a); //~ ERROR E0502
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0503.rs b/src/test/compile-fail/E0503.rs
deleted file mode 100644 (file)
index 810eb8d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let mut value = 3;
-    let _borrow = &mut value;
-    let _sum = value + 1; //~ ERROR E0503
-}
diff --git a/src/test/compile-fail/E0504.rs b/src/test/compile-fail/E0504.rs
deleted file mode 100644 (file)
index c594f24..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct FancyNum {
-    num: u8,
-}
-
-fn main() {
-    let fancy_num = FancyNum { num: 5 };
-    let fancy_ref = &fancy_num;
-
-    let x = move || {
-        println!("child function: {}", fancy_num.num); //~ ERROR E0504
-    };
-
-    x();
-    println!("main function: {}", fancy_ref.num);
-}
diff --git a/src/test/compile-fail/E0505.rs b/src/test/compile-fail/E0505.rs
deleted file mode 100644 (file)
index 2d534b8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Value {}
-
-fn eat(val: Value) {}
-
-fn main() {
-    let x = Value{};
-    {
-        let _ref_to_val: &Value = &x;
-        eat(x); //~ ERROR E0505
-    }
-}
diff --git a/src/test/compile-fail/E0507.rs b/src/test/compile-fail/E0507.rs
deleted file mode 100644 (file)
index 87b1bf5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::cell::RefCell;
-
-struct TheDarkKnight;
-
-impl TheDarkKnight {
-    fn nothing_is_true(self) {}
-}
-
-fn main() {
-    let x = RefCell::new(TheDarkKnight);
-
-    x.borrow().nothing_is_true(); //~ ERROR E0507
-}
diff --git a/src/test/compile-fail/E0509.rs b/src/test/compile-fail/E0509.rs
deleted file mode 100644 (file)
index b92024c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct FancyNum {
-    num: usize
-}
-
-struct DropStruct {
-    fancy: FancyNum
-}
-
-impl Drop for DropStruct {
-    fn drop(&mut self) {
-    }
-}
-
-fn main() {
-    let drop_struct = DropStruct{fancy: FancyNum{num: 5}};
-    let fancy_field = drop_struct.fancy; //~ ERROR E0509
-    println!("Fancy: {}", fancy_field.num);
-}
diff --git a/src/test/compile-fail/E0511.rs b/src/test/compile-fail/E0511.rs
deleted file mode 100644 (file)
index c5c03f8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(platform_intrinsics)]
-
-extern "platform-intrinsic" {
-    fn simd_add<T>(a: T, b: T) -> T;
-}
-
-fn main() {
-    unsafe { simd_add(0, 1); } //~ ERROR E0511
-}
diff --git a/src/test/compile-fail/E0512.rs b/src/test/compile-fail/E0512.rs
deleted file mode 100644 (file)
index 25f9627..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn takes_u8(_: u8) {}
-
-fn main() {
-    unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512
-}
diff --git a/src/test/compile-fail/E0516.rs b/src/test/compile-fail/E0516.rs
deleted file mode 100644 (file)
index be2b89c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x: typeof(92) = 92; //~ ERROR E0516
-                            //~| reserved keyword
-}
diff --git a/src/test/compile-fail/E0517.rs b/src/test/compile-fail/E0517.rs
deleted file mode 100644 (file)
index 561223c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[repr(C)] //~ ERROR: E0517
-type Foo = u8;
-
-#[repr(packed)] //~ ERROR: E0517
-enum Foo2 {Bar, Baz}
-
-#[repr(u8)] //~ ERROR: E0517
-struct Foo3 {bar: bool, baz: bool}
-
-#[repr(C)] //~ ERROR: E0517
-impl Foo3 {
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0518.rs b/src/test/compile-fail/E0518.rs
deleted file mode 100644 (file)
index 6d5b6e4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[inline(always)] //~ ERROR: E0518
-struct Foo;
-
-#[inline(never)] //~ ERROR: E0518
-impl Foo {
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0520.rs b/src/test/compile-fail/E0520.rs
deleted file mode 100644 (file)
index eae5b11..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(specialization)]
-
-trait SpaceLlama {
-    fn fly(&self);
-}
-
-impl<T> SpaceLlama for T {
-    default fn fly(&self) {}
-}
-
-impl<T: Clone> SpaceLlama for T {
-    fn fly(&self) {}
-}
-
-impl SpaceLlama for i32 {
-    default fn fly(&self) {}
-    //~^ ERROR E0520
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0522.rs b/src/test/compile-fail/E0522.rs
deleted file mode 100644 (file)
index 3d43778..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(lang_items)]
-
-#[lang = "cookie"]
-fn cookie() -> ! {
-//~^^ ERROR definition of an unknown language item: `cookie` [E0522]
-    loop {}
-}
diff --git a/src/test/compile-fail/E0527.rs b/src/test/compile-fail/E0527.rs
deleted file mode 100644 (file)
index 67d222e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(slice_patterns)]
-
-fn main() {
-    let r = &[1, 2, 3, 4];
-    match r {
-        &[a, b] => {
-            //~^ ERROR E0527
-            println!("a={}, b={}", a, b);
-        }
-    }
-}
diff --git a/src/test/compile-fail/E0528.rs b/src/test/compile-fail/E0528.rs
deleted file mode 100644 (file)
index e2aa2c0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(slice_patterns)]
-
-fn main() {
-    let r = &[1, 2];
-    match r {
-        &[a, b, c, rest..] => {
-        //~^ ERROR E0528
-        }
-    }
-}
diff --git a/src/test/compile-fail/E0529.rs b/src/test/compile-fail/E0529.rs
deleted file mode 100644 (file)
index 5262ad7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(slice_patterns)]
-
-fn main() {
-    let r: f32 = 1.0;
-    match r {
-        [a, b] => {
-        //~^ ERROR E0529
-        }
-    }
-}
diff --git a/src/test/compile-fail/E0530.rs b/src/test/compile-fail/E0530.rs
deleted file mode 100644 (file)
index 4f674d0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    static TEST: i32 = 0;
-
-    let r: (i32, i32) = (0, 0);
-    match r {
-        TEST => {} //~ ERROR E0530
-    }
-}
diff --git a/src/test/compile-fail/E0532.rs b/src/test/compile-fail/E0532.rs
deleted file mode 100644 (file)
index 5dc3b5f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let value = 1;
-
-    match SomeStruct(value) {
-        StructConst1(_) => { },
-        //~^ ERROR expected tuple struct/variant, found constant `StructConst1`
-        _ => { },
-    }
-
-    struct SomeStruct(u8);
-
-    const StructConst1 : SomeStruct = SomeStruct(1);
-    const StructConst2 : SomeStruct = SomeStruct(2);
-}
diff --git a/src/test/compile-fail/E0534.rs b/src/test/compile-fail/E0534.rs
deleted file mode 100644 (file)
index fc465b2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[inline()] //~ ERROR E0534
-pub fn something() {}
-
-fn main() {
-    something();
-}
diff --git a/src/test/compile-fail/E0558.rs b/src/test/compile-fail/E0558.rs
deleted file mode 100644 (file)
index 64a6ee4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[export_name]
-//~^ ERROR E0558
-
-pub fn something() {}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0559.rs b/src/test/compile-fail/E0559.rs
deleted file mode 100644 (file)
index da0f692..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Field {
-    Fool { x: u32 },
-}
-
-fn main() {
-    let s = Field::Fool { joke: 0 };
-    //~^ ERROR E0559
-}
diff --git a/src/test/compile-fail/E0560.rs b/src/test/compile-fail/E0560.rs
deleted file mode 100644 (file)
index bbb7f08..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Simba {
-    mother: u32,
-}
-
-fn main() {
-    let s = Simba { mother: 1, father: 0 };
-    //~^ ERROR E0560
-}
diff --git a/src/test/compile-fail/E0565-1.rs b/src/test/compile-fail/E0565-1.rs
deleted file mode 100644 (file)
index d3e68c7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(attr_literals)]
-
-// deprecated doesn't currently support literals
-#[deprecated("since")] //~ ERROR E0565
-fn f() {  }
-
-fn main() {  }
diff --git a/src/test/compile-fail/E0565.rs b/src/test/compile-fail/E0565.rs
deleted file mode 100644 (file)
index b2d3692..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(attr_literals)]
-
-// repr currently doesn't support literals
-#[repr("C")] //~ ERROR E0565
-struct A {  }
-
-fn main() {  }
diff --git a/src/test/compile-fail/E0572.rs b/src/test/compile-fail/E0572.rs
deleted file mode 100644 (file)
index bbaab10..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-const FOO: u32 = return 0; //~ ERROR E0572
-
-fn main() {}
diff --git a/src/test/compile-fail/E0582.rs b/src/test/compile-fail/E0582.rs
deleted file mode 100644 (file)
index 5e6f65a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// This test was derived from the wasm and parsell crates.  They
-// stopped compiling when #32330 is fixed.
-
-#![allow(dead_code, unused_variables)]
-
-use std::str::Chars;
-
-pub trait HasOutput<Ch, Str> {
-    type Output;
-}
-
-#[derive(Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Debug)]
-pub enum Token<'a> {
-    Begin(&'a str)
-}
-
-fn mk_unexpected_char_err<'a>() -> Option<&'a i32> {
-    unimplemented!()
-}
-
-fn foo<'a>(data: &mut Chars<'a>) {
-    bar(mk_unexpected_char_err)
-}
-
-fn bar<F>(t: F)
-    // No type can satisfy this requirement, since `'a` does not
-    // appear in any of the input types:
-    where F: for<'a> Fn() -> Option<&'a i32>
-    //~^ ERROR E0582
-{
-}
-
-fn baz<F>(t: F)
-    // No type can satisfy this requirement, since `'a` does not
-    // appear in any of the input types:
-    where F: for<'a> Iterator<Item=&'a i32>
-    //~^ ERROR E0582
-{
-}
-
-fn main() {
-}
diff --git a/src/test/compile-fail/E0585.rs b/src/test/compile-fail/E0585.rs
deleted file mode 100644 (file)
index 1acaf8c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    /// Hello! I'm useless...
-    //~^ ERROR E0585
-}
diff --git a/src/test/compile-fail/E0586.rs b/src/test/compile-fail/E0586.rs
deleted file mode 100644 (file)
index c1bfc5c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
-    let x = &tmp[1..=]; //~ ERROR E0586
-}
diff --git a/src/test/compile-fail/E0597.rs b/src/test/compile-fail/E0597.rs
deleted file mode 100644 (file)
index 2f4a1da..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo<'a> {
-    x: Option<&'a u32>,
-}
-
-fn main() {
-    let mut x = Foo { x: None };
-    let y = 0;
-    x.x = Some(&y);
-    //~^ `y` does not live long enough [E0597]
-}
diff --git a/src/test/compile-fail/E0599.rs b/src/test/compile-fail/E0599.rs
deleted file mode 100644 (file)
index 30fca2b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo;
-
-fn main() {
-    || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599
-}
diff --git a/src/test/compile-fail/E0600.rs b/src/test/compile-fail/E0600.rs
deleted file mode 100644 (file)
index 5457ff2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    !"a"; //~ ERROR E0600
-}
diff --git a/src/test/compile-fail/E0602.rs b/src/test/compile-fail/E0602.rs
deleted file mode 100644 (file)
index cc3e436..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags:-D bogus
-
-// error-pattern:E0602
-// error-pattern:requested on the command line with `-D bogus`
-
-fn main() {}
diff --git a/src/test/compile-fail/E0603.rs b/src/test/compile-fail/E0603.rs
deleted file mode 100644 (file)
index 1cc9f6b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod SomeModule {
-    const PRIVATE: u32 = 0x_a_bad_1dea_u32;
-}
-
-fn main() {
-    SomeModule::PRIVATE; //~ ERROR E0603
-}
diff --git a/src/test/compile-fail/E0604.rs b/src/test/compile-fail/E0604.rs
deleted file mode 100644 (file)
index c5bf3a7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    1u32 as char; //~ ERROR E0604
-}
diff --git a/src/test/compile-fail/E0605.rs b/src/test/compile-fail/E0605.rs
deleted file mode 100644 (file)
index 4b5b8be..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = 0u8;
-    x as Vec<u8>; //~ ERROR E0605
-
-    let v = 0 as *const u8;
-    v as &u8; //~ ERROR E0605
-}
diff --git a/src/test/compile-fail/E0606.rs b/src/test/compile-fail/E0606.rs
deleted file mode 100644 (file)
index 5507173..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    &0u8 as u8; //~ ERROR E0606
-}
diff --git a/src/test/compile-fail/E0607.rs b/src/test/compile-fail/E0607.rs
deleted file mode 100644 (file)
index fa761f2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let v = 0 as *const u8;
-    v as *const [u8]; //~ ERROR E0607
-}
diff --git a/src/test/compile-fail/E0608.rs b/src/test/compile-fail/E0608.rs
deleted file mode 100644 (file)
index d47356a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    0u8[2]; //~ ERROR E0608
-}
diff --git a/src/test/compile-fail/E0609.rs b/src/test/compile-fail/E0609.rs
deleted file mode 100644 (file)
index ddfd9d5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    x: u32,
-}
-struct Bar;
-
-fn main() {
-    let x = Foo { x: 0 };
-    let _ = x.foo; //~ ERROR E0609
-
-    let y = Bar;
-    y.1; //~ ERROR E0609
-}
diff --git a/src/test/compile-fail/E0610.rs b/src/test/compile-fail/E0610.rs
deleted file mode 100644 (file)
index 522d8b0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = 0;
-    let _ = x.foo; //~ ERROR E0610
-}
diff --git a/src/test/compile-fail/E0611.rs b/src/test/compile-fail/E0611.rs
deleted file mode 100644 (file)
index 1e392d1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod a {
-    pub struct Foo(u32);
-
-    impl Foo {
-        pub fn new() -> Foo { Foo(0) }
-    }
-}
-
-fn main() {
-   let y = a::Foo::new();
-   y.0; //~ ERROR E0611
-}
diff --git a/src/test/compile-fail/E0612.rs b/src/test/compile-fail/E0612.rs
deleted file mode 100644 (file)
index 429a8bb..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo(u32);
-
-fn main() {
-   let y = Foo(0);
-   y.1; //~ ERROR E0612
-}
diff --git a/src/test/compile-fail/E0614.rs b/src/test/compile-fail/E0614.rs
deleted file mode 100644 (file)
index 909f0eb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let y = 0u32;
-    *y; //~ ERROR E0614
-}
diff --git a/src/test/compile-fail/E0615.rs b/src/test/compile-fail/E0615.rs
deleted file mode 100644 (file)
index abfa93d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    x: u32,
-}
-
-impl Foo {
-    fn method(&self) {}
-}
-
-fn main() {
-    let f = Foo { x: 0 };
-    f.method; //~ ERROR E0615
-}
diff --git a/src/test/compile-fail/E0616.rs b/src/test/compile-fail/E0616.rs
deleted file mode 100644 (file)
index 2fd9f94..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod a {
-    pub struct Foo {
-        x: u32,
-    }
-
-    impl Foo {
-        pub fn new() -> Foo { Foo { x: 0 } }
-    }
-}
-
-fn main() {
-    let f = a::Foo::new();
-    f.x; //~ ERROR E0616
-}
diff --git a/src/test/compile-fail/E0617.rs b/src/test/compile-fail/E0617.rs
deleted file mode 100644 (file)
index 9375fd9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-tidy-linelength
-
-extern {
-    fn printf(c: *const i8, ...);
-}
-
-fn main() {
-    unsafe {
-        printf(::std::ptr::null(), 0f32);
-        //~^ ERROR can't pass `f32` to variadic function
-        //~| HELP cast the value to `c_double`
-        printf(::std::ptr::null(), 0i8);
-        //~^ ERROR can't pass `i8` to variadic function
-        //~| HELP cast the value to `c_int`
-        printf(::std::ptr::null(), 0i16);
-        //~^ ERROR can't pass `i16` to variadic function
-        //~| HELP cast the value to `c_int`
-        printf(::std::ptr::null(), 0u8);
-        //~^ ERROR can't pass `u8` to variadic function
-        //~| HELP cast the value to `c_uint`
-        printf(::std::ptr::null(), 0u16);
-        //~^ ERROR can't pass `u16` to variadic function
-        //~| HELP cast the value to `c_uint`
-        printf(::std::ptr::null(), printf);
-        //~^ ERROR can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to variadic function
-        //~| HELP cast the value to `unsafe extern "C" fn(*const i8, ...)`
-    }
-}
diff --git a/src/test/compile-fail/E0618.rs b/src/test/compile-fail/E0618.rs
deleted file mode 100644 (file)
index f46bdb9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum X {
-    Entry,
-}
-
-fn main() {
-    X::Entry();
-    //~^ ERROR expected function, found enum variant `X::Entry` [E0618]
-    let x = 0i32;
-    x();
-    //~^ ERROR expected function, found `i32` [E0618]
-}
diff --git a/src/test/compile-fail/E0619.rs b/src/test/compile-fail/E0619.rs
deleted file mode 100644 (file)
index a5a5ff7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x;
-
-    match x {
-        (..) => {} //~ ERROR E0619
-        _ => {}
-    }
-}
-
diff --git a/src/test/compile-fail/E0620.rs b/src/test/compile-fail/E0620.rs
deleted file mode 100644 (file)
index 5e945df..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620
-}
diff --git a/src/test/compile-fail/E0621-does-not-trigger-for-closures.rs b/src/test/compile-fail/E0621-does-not-trigger-for-closures.rs
deleted file mode 100644 (file)
index 980461b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test that we give the generic E0495 when one of the free regions is
-// bound in a closure (rather than suggesting a change to the signature
-// of the closure, which is not specified in `foo` but rather in `invoke`).
-
-// FIXME - This might be better as a UI test, but the finer details
-// of the error seem to vary on different machines.
-fn invoke<'a, F>(x: &'a i32, f: F) -> &'a i32
-where F: FnOnce(&'a i32, &i32) -> &'a i32
-{
-    let y = 22;
-    f(x, &y)
-}
-
-fn foo<'a>(x: &'a i32) {
-    invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0622.rs b/src/test/compile-fail/E0622.rs
deleted file mode 100644 (file)
index f2bde5b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(intrinsics)]
-extern "rust-intrinsic" {
-    pub static breakpoint : unsafe extern "rust-intrinsic" fn();
-    //~^ ERROR intrinsic must be a function [E0622]
-}
-fn main() { unsafe { breakpoint(); } }
diff --git a/src/test/compile-fail/E0624.rs b/src/test/compile-fail/E0624.rs
deleted file mode 100644 (file)
index 952e0b3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod inner {
-    pub struct Foo;
-
-    impl Foo {
-        fn method(&self) {}
-    }
-}
-
-fn main() {
-    let foo = inner::Foo;
-    foo.method(); //~ ERROR method `method` is private [E0624]
-}
diff --git a/src/test/compile-fail/E0637.rs b/src/test/compile-fail/E0637.rs
deleted file mode 100644 (file)
index 455529b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-#![feature(underscore_lifetimes)]
-
-struct Foo<'a: '_>(&'a u8); //~ ERROR invalid lifetime bound name: `'_`
-fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_`
-
-struct Bar<'a>(&'a u8);
-impl<'a: '_> Bar<'a> { //~ ERROR invalid lifetime bound name: `'_`
-  fn bar() {}
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0657.rs b/src/test/compile-fail/E0657.rs
deleted file mode 100644 (file)
index 4595e41..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2017 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-#![allow(warnings)]
-#![feature(conservative_impl_trait, nested_impl_trait)]
-
-trait Id<T> {}
-trait Lt<'a> {}
-
-impl<'a> Lt<'a> for () {}
-impl<T> Id<T> for T {}
-
-fn free_fn_capture_hrtb_in_impl_trait()
-    -> impl for<'a> Id<impl Lt<'a>>
-        //~^ ERROR `impl Trait` can only capture lifetimes bound at the fn or impl level [E0657]
-{
-    ()
-}
-
-struct Foo;
-impl Foo {
-    fn impl_fn_capture_hrtb_in_impl_trait()
-        -> impl for<'a> Id<impl Lt<'a>>
-            //~^ ERROR `impl Trait` can only capture lifetimes bound at the fn or impl level
-    {
-        ()
-    }
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/E0658.rs b/src/test/compile-fail/E0658.rs
deleted file mode 100644 (file)
index d30068e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2018 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let _ = ::std::u128::MAX; //~ ERROR E0658
-}
diff --git a/src/test/compile-fail/E0659.rs b/src/test/compile-fail/E0659.rs
deleted file mode 100644 (file)
index 4bd452b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2018 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod moon {
-    pub fn foo() {}
-}
-
-mod earth {
-    pub fn foo() {}
-}
-
-mod collider {
-    pub use moon::*;
-    pub use earth::*;
-}
-
-fn main() {
-    collider::foo(); //~ ERROR E0659
-}
diff --git a/src/test/ui/error-codes/E0001.rs b/src/test/ui/error-codes/E0001.rs
new file mode 100644 (file)
index 0000000..b72b0d6
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![deny(unreachable_patterns)]
+
+fn main() {
+    let foo = Some(1);
+    match foo {
+        Some(_) => {/* ... */}
+        None => {/* ... */}
+        _ => {/* ... */} //~ ERROR unreachable pattern
+    }
+}
diff --git a/src/test/ui/error-codes/E0001.stderr b/src/test/ui/error-codes/E0001.stderr
new file mode 100644 (file)
index 0000000..d7d67af
--- /dev/null
@@ -0,0 +1,14 @@
+error: unreachable pattern
+  --> $DIR/E0001.rs:18:9
+   |
+18 |         _ => {/* ... */} //~ ERROR unreachable pattern
+   |         ^
+   |
+note: lint level defined here
+  --> $DIR/E0001.rs:11:9
+   |
+11 | #![deny(unreachable_patterns)]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0004-2.rs b/src/test/ui/error-codes/E0004-2.rs
new file mode 100644 (file)
index 0000000..824b86c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = Some(1);
+
+    match x { } //~ ERROR E0004
+}
diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr
new file mode 100644 (file)
index 0000000..2f4d26e
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0004]: non-exhaustive patterns: type std::option::Option<i32> is non-empty
+  --> $DIR/E0004-2.rs:14:11
+   |
+14 |     match x { } //~ ERROR E0004
+   |           ^
+   |
+help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
+  --> $DIR/E0004-2.rs:14:11
+   |
+14 |     match x { } //~ ERROR E0004
+   |           ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0004.rs b/src/test/ui/error-codes/E0004.rs
new file mode 100644 (file)
index 0000000..8df07a0
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Terminator {
+    HastaLaVistaBaby,
+    TalkToMyHand,
+}
+
+fn main() {
+    let x = Terminator::HastaLaVistaBaby;
+
+    match x { //~ ERROR E0004
+        Terminator::TalkToMyHand => {}
+    }
+}
diff --git a/src/test/ui/error-codes/E0004.stderr b/src/test/ui/error-codes/E0004.stderr
new file mode 100644 (file)
index 0000000..836afaf
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0004]: non-exhaustive patterns: `HastaLaVistaBaby` not covered
+  --> $DIR/E0004.rs:19:11
+   |
+19 |     match x { //~ ERROR E0004
+   |           ^ pattern `HastaLaVistaBaby` not covered
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0005.rs b/src/test/ui/error-codes/E0005.rs
new file mode 100644 (file)
index 0000000..0405bba
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = Some(1);
+    let Some(y) = x; //~ ERROR E0005
+}
diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr
new file mode 100644 (file)
index 0000000..d052c12
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0005]: refutable pattern in local binding: `None` not covered
+  --> $DIR/E0005.rs:13:9
+   |
+13 |     let Some(y) = x; //~ ERROR E0005
+   |         ^^^^^^^ pattern `None` not covered
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0007.rs b/src/test/ui/error-codes/E0007.rs
new file mode 100644 (file)
index 0000000..d5acbde
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = Some("s".to_string());
+    match x {
+        op_string @ Some(s) => {},
+        //~^ ERROR E0007
+        //~| ERROR E0303
+        None => {},
+    }
+}
diff --git a/src/test/ui/error-codes/E0007.stderr b/src/test/ui/error-codes/E0007.stderr
new file mode 100644 (file)
index 0000000..1370cac
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0007]: cannot bind by-move with sub-bindings
+  --> $DIR/E0007.rs:14:9
+   |
+14 |         op_string @ Some(s) => {},
+   |         ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
+
+error[E0303]: pattern bindings are not allowed after an `@`
+  --> $DIR/E0007.rs:14:26
+   |
+14 |         op_string @ Some(s) => {},
+   |                          ^ not allowed after `@`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0008.rs b/src/test/ui/error-codes/E0008.rs
new file mode 100644 (file)
index 0000000..ba5720e
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    match Some("hi".to_string()) {
+        Some(s) if s.len() == 0 => {},
+        //~^ ERROR E0008
+        _ => {},
+    }
+}
diff --git a/src/test/ui/error-codes/E0008.stderr b/src/test/ui/error-codes/E0008.stderr
new file mode 100644 (file)
index 0000000..6ae4506
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0008]: cannot bind by-move into a pattern guard
+  --> $DIR/E0008.rs:13:14
+   |
+13 |         Some(s) if s.len() == 0 => {},
+   |              ^ moves value into pattern guard
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0009.rs b/src/test/ui/error-codes/E0009.rs
new file mode 100644 (file)
index 0000000..02e2e80
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    struct X { x: (), }
+    let x = Some((X { x: () }, X { x: () }));
+    match x {
+        Some((y, ref z)) => {},
+        //~^ ERROR E0009
+        None => panic!()
+    }
+}
diff --git a/src/test/ui/error-codes/E0009.stderr b/src/test/ui/error-codes/E0009.stderr
new file mode 100644 (file)
index 0000000..31db957
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0009]: cannot bind by-move and by-ref in the same pattern
+  --> $DIR/E0009.rs:15:15
+   |
+15 |         Some((y, ref z)) => {},
+   |               ^  ----- both by-ref and by-move used
+   |               |
+   |               by-move pattern here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0010-teach.rs b/src/test/ui/error-codes/E0010-teach.rs
new file mode 100644 (file)
index 0000000..e5ccf32
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z teach
+
+#![feature(box_syntax)]
+#![allow(warnings)]
+
+const CON : Box<i32> = box 0; //~ ERROR E0010
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0010-teach.stderr b/src/test/ui/error-codes/E0010-teach.stderr
new file mode 100644 (file)
index 0000000..46f8101
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0010]: allocations are not allowed in constants
+  --> $DIR/E0010-teach.rs:16:24
+   |
+16 | const CON : Box<i32> = box 0; //~ ERROR E0010
+   |                        ^^^^^ allocation not allowed in constants
+   |
+   = note: The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0010.rs b/src/test/ui/error-codes/E0010.rs
new file mode 100644 (file)
index 0000000..66a9319
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(box_syntax)]
+#![allow(warnings)]
+
+const CON : Box<i32> = box 0; //~ ERROR E0010
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0010.stderr b/src/test/ui/error-codes/E0010.stderr
new file mode 100644 (file)
index 0000000..5cef631
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0010]: allocations are not allowed in constants
+  --> $DIR/E0010.rs:14:24
+   |
+14 | const CON : Box<i32> = box 0; //~ ERROR E0010
+   |                        ^^^^^ allocation not allowed in constants
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0017.rs b/src/test/ui/error-codes/E0017.rs
new file mode 100644 (file)
index 0000000..c98c35a
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+static X: i32 = 1;
+const C: i32 = 2;
+
+const CR: &'static mut i32 = &mut C; //~ ERROR E0017
+static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+                                              //~| ERROR cannot borrow
+static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
+fn main() {}
diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr
new file mode 100644 (file)
index 0000000..f1fe1e5
--- /dev/null
@@ -0,0 +1,26 @@
+error[E0017]: references in constants may only refer to immutable values
+  --> $DIR/E0017.rs:14:30
+   |
+14 | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
+   |                              ^^^^^^ constants require immutable values
+
+error[E0017]: references in statics may only refer to immutable values
+  --> $DIR/E0017.rs:15:39
+   |
+15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+   |                                       ^^^^^^ statics require immutable values
+
+error[E0596]: cannot borrow immutable static item as mutable
+  --> $DIR/E0017.rs:15:44
+   |
+15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+   |                                            ^
+
+error[E0017]: references in statics may only refer to immutable values
+  --> $DIR/E0017.rs:17:38
+   |
+17 | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
+   |                                      ^^^^^^ statics require immutable values
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/error-codes/E0023.rs b/src/test/ui/error-codes/E0023.rs
new file mode 100644 (file)
index 0000000..24032c5
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Fruit {
+    Apple(String, String),
+    Pear(u32),
+}
+
+
+fn main() {
+    let x = Fruit::Apple(String::new(), String::new());
+    match x {
+        Fruit::Apple(a) => {}, //~ ERROR E0023
+        Fruit::Apple(a, b, c) => {}, //~ ERROR E0023
+        Fruit::Pear(1, 2) => {}, //~ ERROR E0023
+    }
+}
diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr
new file mode 100644 (file)
index 0000000..582dffe
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
+  --> $DIR/E0023.rs:20:9
+   |
+20 |         Fruit::Apple(a) => {}, //~ ERROR E0023
+   |         ^^^^^^^^^^^^^^^ expected 2 fields, found 1
+
+error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
+  --> $DIR/E0023.rs:21:9
+   |
+21 |         Fruit::Apple(a, b, c) => {}, //~ ERROR E0023
+   |         ^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3
+
+error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
+  --> $DIR/E0023.rs:22:9
+   |
+22 |         Fruit::Pear(1, 2) => {}, //~ ERROR E0023
+   |         ^^^^^^^^^^^^^^^^^ expected 1 field, found 2
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0025.rs b/src/test/ui/error-codes/E0025.rs
new file mode 100644 (file)
index 0000000..81d0ea8
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    a: u8,
+    b: u8,
+}
+
+fn main() {
+    let x = Foo { a:1, b:2 };
+    let Foo { a: x, a: y, b: 0 } = x;
+    //~^ ERROR field `a` bound multiple times in the pattern
+}
diff --git a/src/test/ui/error-codes/E0025.stderr b/src/test/ui/error-codes/E0025.stderr
new file mode 100644 (file)
index 0000000..480cd2a
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0025]: field `a` bound multiple times in the pattern
+  --> $DIR/E0025.rs:18:21
+   |
+18 |     let Foo { a: x, a: y, b: 0 } = x;
+   |               ----  ^^^^ multiple uses of `a` in pattern
+   |               |
+   |               first use of `a`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0026-teach.rs b/src/test/ui/error-codes/E0026-teach.rs
new file mode 100644 (file)
index 0000000..e0ce44a
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z teach
+
+struct Thing {
+    x: u32,
+    y: u32
+}
+
+fn main() {
+    let thing = Thing { x: 0, y: 0 };
+    match thing {
+        Thing { x, y, z } => {}
+        //~^ ERROR struct `Thing` does not have a field named `z` [E0026]
+    }
+}
diff --git a/src/test/ui/error-codes/E0026-teach.stderr b/src/test/ui/error-codes/E0026-teach.stderr
new file mode 100644 (file)
index 0000000..ee83cfb
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0026]: struct `Thing` does not have a field named `z`
+  --> $DIR/E0026-teach.rs:21:23
+   |
+21 |         Thing { x, y, z } => {}
+   |                       ^ struct `Thing` does not have field `z`
+   |
+   = note: This error indicates that a struct pattern attempted to extract a non-existent field from a struct. Struct fields are identified by the name used before the colon : so struct patterns should resemble the declaration of the struct type being matched.
+           
+           If you are using shorthand field patterns but want to refer to the struct field by a different name, you should rename it explicitly.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0026.rs b/src/test/ui/error-codes/E0026.rs
new file mode 100644 (file)
index 0000000..f8ad7b5
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Thing {
+    x: u32,
+    y: u32
+}
+
+fn main() {
+    let thing = Thing { x: 0, y: 0 };
+    match thing {
+        Thing { x, y, z } => {}
+        //~^ ERROR struct `Thing` does not have a field named `z` [E0026]
+    }
+}
diff --git a/src/test/ui/error-codes/E0026.stderr b/src/test/ui/error-codes/E0026.stderr
new file mode 100644 (file)
index 0000000..c9819df
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0026]: struct `Thing` does not have a field named `z`
+  --> $DIR/E0026.rs:19:23
+   |
+19 |         Thing { x, y, z } => {}
+   |                       ^ struct `Thing` does not have field `z`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0027-teach.rs b/src/test/ui/error-codes/E0027-teach.rs
new file mode 100644 (file)
index 0000000..17e045b
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z teach
+
+struct Dog {
+    name: String,
+    age: u32,
+}
+
+fn main() {
+    let d = Dog { name: "Rusty".to_string(), age: 8 };
+
+    match d {
+        Dog { age: x } => {}
+        //~^ ERROR pattern does not mention field `name`
+    }
+}
diff --git a/src/test/ui/error-codes/E0027-teach.stderr b/src/test/ui/error-codes/E0027-teach.stderr
new file mode 100644 (file)
index 0000000..e9f9e4b
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0027]: pattern does not mention field `name`
+  --> $DIR/E0027-teach.rs:22:9
+   |
+22 |         Dog { age: x } => {}
+   |         ^^^^^^^^^^^^^^ missing field `name`
+   |
+   = note: This error indicates that a pattern for a struct fails to specify a sub-pattern for every one of the struct's fields. Ensure that each field from the struct's definition is mentioned in the pattern, or use `..` to ignore unwanted fields.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0027.rs b/src/test/ui/error-codes/E0027.rs
new file mode 100644 (file)
index 0000000..b63b0ab
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Dog {
+    name: String,
+    age: u32,
+}
+
+fn main() {
+    let d = Dog { name: "Rusty".to_string(), age: 8 };
+
+    match d {
+        Dog { age: x } => {}
+        //~^ ERROR pattern does not mention field `name`
+    }
+}
diff --git a/src/test/ui/error-codes/E0027.stderr b/src/test/ui/error-codes/E0027.stderr
new file mode 100644 (file)
index 0000000..0f93a77
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0027]: pattern does not mention field `name`
+  --> $DIR/E0027.rs:20:9
+   |
+20 |         Dog { age: x } => {}
+   |         ^^^^^^^^^^^^^^ missing field `name`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0029-teach.rs b/src/test/ui/error-codes/E0029-teach.rs
new file mode 100644 (file)
index 0000000..ca85f58
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z teach
+
+fn main() {
+    let s = "hoho";
+
+    match s {
+        "hello" ... "world" => {}
+        //~^ ERROR only char and numeric types are allowed in range patterns
+        //~| ERROR non-reference pattern used to match a reference
+        _ => {}
+    }
+}
diff --git a/src/test/ui/error-codes/E0029-teach.stderr b/src/test/ui/error-codes/E0029-teach.stderr
new file mode 100644 (file)
index 0000000..dbb8d97
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0658]: non-reference pattern used to match a reference (see issue #42640)
+  --> $DIR/E0029-teach.rs:17:9
+   |
+17 |         "hello" ... "world" => {}
+   |         ^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&"hello" ... "world"`
+   |
+   = help: add #![feature(match_default_bindings)] to the crate attributes to enable
+
+error[E0029]: only char and numeric types are allowed in range patterns
+  --> $DIR/E0029-teach.rs:17:9
+   |
+17 |         "hello" ... "world" => {}
+   |         ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types
+   |
+   = note: start type: &'static str
+   = note: end type: &'static str
+   = note: In a match expression, only numbers and characters can be matched against a range. This is because the compiler checks that the range is non-empty at compile-time, and is unable to evaluate arbitrary comparison functions. If you want to capture values of an orderable type between two end-points, you can use a guard.
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0029.rs b/src/test/ui/error-codes/E0029.rs
new file mode 100644 (file)
index 0000000..80d215b
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let s = "hoho";
+
+    match s {
+        "hello" ... "world" => {}
+        //~^ ERROR only char and numeric types are allowed in range patterns
+        //~| ERROR non-reference pattern used to match a reference
+        _ => {}
+    }
+}
diff --git a/src/test/ui/error-codes/E0029.stderr b/src/test/ui/error-codes/E0029.stderr
new file mode 100644 (file)
index 0000000..02fbd20
--- /dev/null
@@ -0,0 +1,19 @@
+error[E0658]: non-reference pattern used to match a reference (see issue #42640)
+  --> $DIR/E0029.rs:15:9
+   |
+15 |         "hello" ... "world" => {}
+   |         ^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&"hello" ... "world"`
+   |
+   = help: add #![feature(match_default_bindings)] to the crate attributes to enable
+
+error[E0029]: only char and numeric types are allowed in range patterns
+  --> $DIR/E0029.rs:15:9
+   |
+15 |         "hello" ... "world" => {}
+   |         ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types
+   |
+   = note: start type: &'static str
+   = note: end type: &'static str
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0030-teach.rs b/src/test/ui/error-codes/E0030-teach.rs
new file mode 100644 (file)
index 0000000..2af32ed
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z teach
+
+fn main() {
+    match 5u32 {
+        1000 ... 5 => {}
+        //~^ ERROR lower range bound must be less than or equal to upper
+    }
+}
diff --git a/src/test/ui/error-codes/E0030-teach.stderr b/src/test/ui/error-codes/E0030-teach.stderr
new file mode 100644 (file)
index 0000000..40b3d79
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0030]: lower range bound must be less than or equal to upper
+  --> $DIR/E0030-teach.rs:15:9
+   |
+15 |         1000 ... 5 => {}
+   |         ^^^^ lower bound larger than upper bound
+   |
+   = note: When matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0030.rs b/src/test/ui/error-codes/E0030.rs
new file mode 100644 (file)
index 0000000..ef3bded
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+fn main() {
+    match 5u32 {
+        1000 ... 5 => {}
+        //~^ ERROR lower range bound must be less than or equal to upper
+    }
+}
diff --git a/src/test/ui/error-codes/E0030.stderr b/src/test/ui/error-codes/E0030.stderr
new file mode 100644 (file)
index 0000000..7bdecd0
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0030]: lower range bound must be less than or equal to upper
+  --> $DIR/E0030.rs:14:9
+   |
+14 |         1000 ... 5 => {}
+   |         ^^^^ lower bound larger than upper bound
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0033-teach.rs b/src/test/ui/error-codes/E0033-teach.rs
new file mode 100644 (file)
index 0000000..51a1390
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z teach
+
+trait SomeTrait {
+    fn foo();
+}
+
+fn main() {
+    let trait_obj: &SomeTrait = SomeTrait;
+    //~^ ERROR expected value, found trait `SomeTrait`
+    //~| ERROR E0038
+    //~| method `foo` has no receiver
+
+    let &invalid = trait_obj;
+    //~^ ERROR E0033
+}
diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr
new file mode 100644 (file)
index 0000000..ea60fcb
--- /dev/null
@@ -0,0 +1,26 @@
+error[E0423]: expected value, found trait `SomeTrait`
+  --> $DIR/E0033-teach.rs:18:33
+   |
+18 |     let trait_obj: &SomeTrait = SomeTrait;
+   |                                 ^^^^^^^^^ not a value
+
+error[E0038]: the trait `SomeTrait` cannot be made into an object
+  --> $DIR/E0033-teach.rs:18:20
+   |
+18 |     let trait_obj: &SomeTrait = SomeTrait;
+   |                    ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
+   |
+   = note: method `foo` has no receiver
+
+error[E0033]: type `&SomeTrait` cannot be dereferenced
+  --> $DIR/E0033-teach.rs:23:9
+   |
+23 |     let &invalid = trait_obj;
+   |         ^^^^^^^^ type `&SomeTrait` cannot be dereferenced
+   |
+   = note: This error indicates that a pointer to a trait type cannot be implicitly dereferenced by a pattern. Every trait defines a type, but because the size of trait implementors isn't fixed, this type has no compile-time size. Therefore, all accesses to trait types must be through pointers. If you encounter this error you should try to avoid dereferencing the pointer.
+           
+           You can read more about trait objects in the Trait Objects section of the Reference: https://doc.rust-lang.org/reference/types.html#trait-objects
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0033.rs b/src/test/ui/error-codes/E0033.rs
new file mode 100644 (file)
index 0000000..3cdbb55
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait SomeTrait {
+    fn foo();
+}
+
+fn main() {
+    let trait_obj: &SomeTrait = SomeTrait;
+    //~^ ERROR expected value, found trait `SomeTrait`
+    //~| ERROR E0038
+    //~| method `foo` has no receiver
+
+    let &invalid = trait_obj;
+    //~^ ERROR E0033
+}
diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr
new file mode 100644 (file)
index 0000000..abc535e
--- /dev/null
@@ -0,0 +1,22 @@
+error[E0423]: expected value, found trait `SomeTrait`
+  --> $DIR/E0033.rs:16:33
+   |
+16 |     let trait_obj: &SomeTrait = SomeTrait;
+   |                                 ^^^^^^^^^ not a value
+
+error[E0038]: the trait `SomeTrait` cannot be made into an object
+  --> $DIR/E0033.rs:16:20
+   |
+16 |     let trait_obj: &SomeTrait = SomeTrait;
+   |                    ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
+   |
+   = note: method `foo` has no receiver
+
+error[E0033]: type `&SomeTrait` cannot be dereferenced
+  --> $DIR/E0033.rs:21:9
+   |
+21 |     let &invalid = trait_obj;
+   |         ^^^^^^^^ type `&SomeTrait` cannot be dereferenced
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0034.rs b/src/test/ui/error-codes/E0034.rs
new file mode 100644 (file)
index 0000000..6eebd4d
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Test;
+
+trait Trait1 {
+    fn foo();
+}
+
+trait Trait2 {
+    fn foo();
+}
+
+impl Trait1 for Test {
+    fn foo() {}
+}
+
+impl Trait2 for Test {
+    fn foo() {}
+}
+
+fn main() {
+    Test::foo() //~ ERROR multiple applicable items in scope
+}
diff --git a/src/test/ui/error-codes/E0034.stderr b/src/test/ui/error-codes/E0034.stderr
new file mode 100644 (file)
index 0000000..238fd0d
--- /dev/null
@@ -0,0 +1,19 @@
+error[E0034]: multiple applicable items in scope
+  --> $DIR/E0034.rs:30:5
+   |
+30 |     Test::foo() //~ ERROR multiple applicable items in scope
+   |     ^^^^^^^^^ multiple `foo` found
+   |
+note: candidate #1 is defined in an impl of the trait `Trait1` for the type `Test`
+  --> $DIR/E0034.rs:22:5
+   |
+22 |     fn foo() {}
+   |     ^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `Trait2` for the type `Test`
+  --> $DIR/E0034.rs:26:5
+   |
+26 |     fn foo() {}
+   |     ^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0038.rs b/src/test/ui/error-codes/E0038.rs
new file mode 100644 (file)
index 0000000..8087928
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Trait {
+    fn foo(&self) -> Self;
+}
+
+fn call_foo(x: Box<Trait>) {
+    //~^ ERROR E0038
+    let y = x.foo();
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0038.stderr b/src/test/ui/error-codes/E0038.stderr
new file mode 100644 (file)
index 0000000..e942356
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0038]: the trait `Trait` cannot be made into an object
+  --> $DIR/E0038.rs:15:1
+   |
+15 | fn call_foo(x: Box<Trait>) {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` cannot be made into an object
+   |
+   = note: method `foo` references the `Self` type in its arguments or return type
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0040.rs b/src/test/ui/error-codes/E0040.rs
new file mode 100644 (file)
index 0000000..8385d68
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    x: i32,
+}
+
+impl Drop for Foo {
+    fn drop(&mut self) {
+        println!("kaboom");
+    }
+}
+
+fn main() {
+    let mut x = Foo { x: -7 };
+    x.drop();
+    //~^ ERROR E0040
+}
diff --git a/src/test/ui/error-codes/E0040.stderr b/src/test/ui/error-codes/E0040.stderr
new file mode 100644 (file)
index 0000000..73cb49f
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0040]: explicit use of destructor method
+  --> $DIR/E0040.rs:23:7
+   |
+23 |     x.drop();
+   |       ^^^^ explicit destructor calls not allowed
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0044.rs b/src/test/ui/error-codes/E0044.rs
new file mode 100644 (file)
index 0000000..48fe230
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern { fn some_func<T>(x: T); } //~ ERROR E0044
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0044.stderr b/src/test/ui/error-codes/E0044.stderr
new file mode 100644 (file)
index 0000000..65a429c
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0044]: foreign items may not have type parameters
+  --> $DIR/E0044.rs:11:10
+   |
+11 | extern { fn some_func<T>(x: T); } //~ ERROR E0044
+   |          ^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: consider using specialization instead of type parameters
+  --> $DIR/E0044.rs:11:10
+   |
+11 | extern { fn some_func<T>(x: T); } //~ ERROR E0044
+   |          ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0045.rs b/src/test/ui/error-codes/E0045.rs
new file mode 100644 (file)
index 0000000..57c639d
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern "Rust" { fn foo(x: u8, ...); }   //~ ERROR E0045
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0045.stderr b/src/test/ui/error-codes/E0045.stderr
new file mode 100644 (file)
index 0000000..cd40056
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0045]: variadic function must have C or cdecl calling convention
+  --> $DIR/E0045.rs:11:17
+   |
+11 | extern "Rust" { fn foo(x: u8, ...); }   //~ ERROR E0045
+   |                 ^^^^^^^^^^^^^^^^^^^ variadics require C or cdecl calling convention
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0049.rs b/src/test/ui/error-codes/E0049.rs
new file mode 100644 (file)
index 0000000..5867e11
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn foo<T: Default>(x: T) -> Self;
+}
+
+struct Bar;
+
+impl Foo for Bar {
+    fn foo(x: bool) -> Self { Bar } //~ ERROR E0049
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0049.stderr b/src/test/ui/error-codes/E0049.stderr
new file mode 100644 (file)
index 0000000..e6f72ba
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0049]: method `foo` has 0 type parameters but its trait declaration has 1 type parameter
+  --> $DIR/E0049.rs:18:5
+   |
+12 |     fn foo<T: Default>(x: T) -> Self;
+   |     --------------------------------- expected 1 type parameter
+...
+18 |     fn foo(x: bool) -> Self { Bar } //~ ERROR E0049
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ found 0 type parameters
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0050.rs b/src/test/ui/error-codes/E0050.rs
new file mode 100644 (file)
index 0000000..2ccc380
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn foo(&self, x: u8) -> bool;
+    fn bar(&self, x: u8, y: u8, z: u8);
+    fn less(&self);
+}
+
+struct Bar;
+
+impl Foo for Bar {
+    fn foo(&self) -> bool { true } //~ ERROR E0050
+    fn bar(&self) { } //~ ERROR E0050
+    fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0050.stderr b/src/test/ui/error-codes/E0050.stderr
new file mode 100644 (file)
index 0000000..d95a200
--- /dev/null
@@ -0,0 +1,29 @@
+error[E0050]: method `foo` has 1 parameter but the declaration in trait `Foo::foo` has 2
+  --> $DIR/E0050.rs:20:12
+   |
+12 |     fn foo(&self, x: u8) -> bool;
+   |                      -- trait requires 2 parameters
+...
+20 |     fn foo(&self) -> bool { true } //~ ERROR E0050
+   |            ^^^^^ expected 2 parameters, found 1
+
+error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 4
+  --> $DIR/E0050.rs:21:12
+   |
+13 |     fn bar(&self, x: u8, y: u8, z: u8);
+   |                                    -- trait requires 4 parameters
+...
+21 |     fn bar(&self) { } //~ ERROR E0050
+   |            ^^^^^ expected 4 parameters, found 1
+
+error[E0050]: method `less` has 4 parameters but the declaration in trait `Foo::less` has 1
+  --> $DIR/E0050.rs:22:37
+   |
+14 |     fn less(&self);
+   |             ----- trait requires 1 parameter
+...
+22 |     fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050
+   |                                     ^^ expected 1 parameter, found 4
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0054.rs b/src/test/ui/error-codes/E0054.rs
new file mode 100644 (file)
index 0000000..158cd6f
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = 5;
+    let x_is_nonzero = x as bool; //~ ERROR E0054
+}
diff --git a/src/test/ui/error-codes/E0054.stderr b/src/test/ui/error-codes/E0054.stderr
new file mode 100644 (file)
index 0000000..fc33157
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0054]: cannot cast as `bool`
+  --> $DIR/E0054.rs:13:24
+   |
+13 |     let x_is_nonzero = x as bool; //~ ERROR E0054
+   |                        ^^^^^^^^^ unsupported cast
+   |
+   = help: compare with zero instead
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0055.rs b/src/test/ui/error-codes/E0055.rs
new file mode 100644 (file)
index 0000000..6e186b8
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![recursion_limit="2"]
+struct Foo;
+
+impl Foo {
+    fn foo(&self) {}
+}
+
+fn main() {
+    let foo = Foo;
+    let ref_foo = &&Foo;
+    ref_foo.foo();
+    //~^ ERROR E0055
+}
diff --git a/src/test/ui/error-codes/E0055.stderr b/src/test/ui/error-codes/E0055.stderr
new file mode 100644 (file)
index 0000000..001178e
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0055]: reached the recursion limit while auto-dereferencing Foo
+  --> $DIR/E0055.rs:21:13
+   |
+21 |     ref_foo.foo();
+   |             ^^^ deref recursion limit reached
+   |
+   = help: consider adding a `#![recursion_limit="4"]` attribute to your crate
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0057.rs b/src/test/ui/error-codes/E0057.rs
new file mode 100644 (file)
index 0000000..1fb5498
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let f = |x| x * 3;
+    let a = f(); //~ ERROR E0057
+    let b = f(4);
+    let c = f(2, 3); //~ ERROR E0057
+}
diff --git a/src/test/ui/error-codes/E0057.stderr b/src/test/ui/error-codes/E0057.stderr
new file mode 100644 (file)
index 0000000..450c87c
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0057]: this function takes 1 parameter but 0 parameters were supplied
+  --> $DIR/E0057.rs:13:13
+   |
+13 |     let a = f(); //~ ERROR E0057
+   |             ^^^ expected 1 parameter
+
+error[E0057]: this function takes 1 parameter but 2 parameters were supplied
+  --> $DIR/E0057.rs:15:13
+   |
+15 |     let c = f(2, 3); //~ ERROR E0057
+   |             ^^^^^^^ expected 1 parameter
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0059.rs b/src/test/ui/error-codes/E0059.rs
new file mode 100644 (file)
index 0000000..4ae9b2f
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(unboxed_closures)]
+
+fn foo<F: Fn<i32>>(f: F) -> F::Output { f(3) } //~ ERROR E0059
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0059.stderr b/src/test/ui/error-codes/E0059.stderr
new file mode 100644 (file)
index 0000000..aca4b88
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0059]: cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit
+  --> $DIR/E0059.rs:13:41
+   |
+13 | fn foo<F: Fn<i32>>(f: F) -> F::Output { f(3) } //~ ERROR E0059
+   |                                         ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0060.rs b/src/test/ui/error-codes/E0060.rs
new file mode 100644 (file)
index 0000000..f450520
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern "C" {
+    fn printf(_: *const u8, ...) -> u32;
+}
+
+fn main() {
+    unsafe { printf(); }
+    //~^ ERROR E0060
+    //~| expected at least 1 parameter
+}
diff --git a/src/test/ui/error-codes/E0060.stderr b/src/test/ui/error-codes/E0060.stderr
new file mode 100644 (file)
index 0000000..8207220
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0060]: this function takes at least 1 parameter but 0 parameters were supplied
+  --> $DIR/E0060.rs:16:14
+   |
+12 |     fn printf(_: *const u8, ...) -> u32;
+   |     ------------------------------------ defined here
+...
+16 |     unsafe { printf(); }
+   |              ^^^^^^^^ expected at least 1 parameter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0061.rs b/src/test/ui/error-codes/E0061.rs
new file mode 100644 (file)
index 0000000..221e18c
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn f(a: u16, b: &str) {}
+
+fn f2(a: u16) {}
+
+fn main() {
+    f(0);
+    //~^ ERROR E0061
+    //~| expected 2 parameters
+
+    f2();
+    //~^ ERROR E0061
+    //~| expected 1 parameter
+}
diff --git a/src/test/ui/error-codes/E0061.stderr b/src/test/ui/error-codes/E0061.stderr
new file mode 100644 (file)
index 0000000..89d81b5
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0061]: this function takes 2 parameters but 1 parameter was supplied
+  --> $DIR/E0061.rs:16:5
+   |
+11 | fn f(a: u16, b: &str) {}
+   | --------------------- defined here
+...
+16 |     f(0);
+   |     ^^^^ expected 2 parameters
+
+error[E0061]: this function takes 1 parameter but 0 parameters were supplied
+  --> $DIR/E0061.rs:20:5
+   |
+13 | fn f2(a: u16) {}
+   | ------------- defined here
+...
+20 |     f2();
+   |     ^^^^ expected 1 parameter
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0062.rs b/src/test/ui/error-codes/E0062.rs
new file mode 100644 (file)
index 0000000..684c946
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    x: i32
+}
+
+fn main() {
+    let x = Foo {
+        x: 0,
+        x: 0,
+        //~^ ERROR E0062
+    };
+}
diff --git a/src/test/ui/error-codes/E0062.stderr b/src/test/ui/error-codes/E0062.stderr
new file mode 100644 (file)
index 0000000..6c5ecf4
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0062]: field `x` specified more than once
+  --> $DIR/E0062.rs:18:9
+   |
+17 |         x: 0,
+   |         ---- first use of `x`
+18 |         x: 0,
+   |         ^^ used more than once
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0063.rs b/src/test/ui/error-codes/E0063.rs
new file mode 100644 (file)
index 0000000..0208aff
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-tidy-linelength
+
+struct SingleFoo {
+    x: i32
+}
+
+struct PluralFoo {
+    x: i32,
+    y: i32,
+    z: i32
+}
+
+struct TruncatedFoo {
+    a: i32,
+    b: i32,
+    x: i32,
+    y: i32,
+    z: i32
+}
+
+struct TruncatedPluralFoo {
+    a: i32,
+    b: i32,
+    c: i32,
+    x: i32,
+    y: i32,
+    z: i32
+}
+
+
+fn main() {
+    let w = SingleFoo { };
+    //~^ ERROR missing field `x` in initializer of `SingleFoo`
+    let x = PluralFoo {x: 1};
+    //~^ ERROR missing fields `y`, `z` in initializer of `PluralFoo`
+    let y = TruncatedFoo{x:1};
+    //~^ missing fields `a`, `b`, `y` and 1 other field in initializer of `TruncatedFoo`
+    let z = TruncatedPluralFoo{x:1};
+    //~^ ERROR missing fields `a`, `b`, `c` and 2 other fields in initializer of `TruncatedPluralFoo`
+}
diff --git a/src/test/ui/error-codes/E0063.stderr b/src/test/ui/error-codes/E0063.stderr
new file mode 100644 (file)
index 0000000..023819c
--- /dev/null
@@ -0,0 +1,26 @@
+error[E0063]: missing field `x` in initializer of `SingleFoo`
+  --> $DIR/E0063.rs:42:13
+   |
+42 |     let w = SingleFoo { };
+   |             ^^^^^^^^^ missing `x`
+
+error[E0063]: missing fields `y`, `z` in initializer of `PluralFoo`
+  --> $DIR/E0063.rs:44:13
+   |
+44 |     let x = PluralFoo {x: 1};
+   |             ^^^^^^^^^ missing `y`, `z`
+
+error[E0063]: missing fields `a`, `b`, `y` and 1 other field in initializer of `TruncatedFoo`
+  --> $DIR/E0063.rs:46:13
+   |
+46 |     let y = TruncatedFoo{x:1};
+   |             ^^^^^^^^^^^^ missing `a`, `b`, `y` and 1 other field
+
+error[E0063]: missing fields `a`, `b`, `c` and 2 other fields in initializer of `TruncatedPluralFoo`
+  --> $DIR/E0063.rs:48:13
+   |
+48 |     let z = TruncatedPluralFoo{x:1};
+   |             ^^^^^^^^^^^^^^^^^^ missing `a`, `b`, `c` and 2 other fields
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/error-codes/E0067.rs b/src/test/ui/error-codes/E0067.rs
new file mode 100644 (file)
index 0000000..a3fc30e
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::collections::LinkedList;
+
+fn main() {
+    LinkedList::new() += 1; //~ ERROR E0368
+                            //~^ ERROR E0067
+}
diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr
new file mode 100644 (file)
index 0000000..a4e1561
--- /dev/null
@@ -0,0 +1,16 @@
+error[E0368]: binary assignment operation `+=` cannot be applied to type `std::collections::LinkedList<_>`
+  --> $DIR/E0067.rs:14:5
+   |
+14 |     LinkedList::new() += 1; //~ ERROR E0368
+   |     -----------------^^^^^
+   |     |
+   |     cannot use `+=` on type `std::collections::LinkedList<_>`
+
+error[E0067]: invalid left-hand side expression
+  --> $DIR/E0067.rs:14:5
+   |
+14 |     LinkedList::new() += 1; //~ ERROR E0368
+   |     ^^^^^^^^^^^^^^^^^ invalid expression for left-hand side
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0069.rs b/src/test/ui/error-codes/E0069.rs
new file mode 100644 (file)
index 0000000..a6a7898
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo() -> u8 {
+    return;
+    //~^ ERROR `return;` in a function whose return type is not `()`
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0069.stderr b/src/test/ui/error-codes/E0069.stderr
new file mode 100644 (file)
index 0000000..8424531
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0069]: `return;` in a function whose return type is not `()`
+  --> $DIR/E0069.rs:12:5
+   |
+12 |     return;
+   |     ^^^^^^ return type is not ()
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0070.rs b/src/test/ui/error-codes/E0070.rs
new file mode 100644 (file)
index 0000000..ba66bd0
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+const SOME_CONST : i32 = 12;
+
+fn some_other_func() {}
+
+fn some_function() {
+    SOME_CONST = 14; //~ ERROR E0070
+    1 = 3; //~ ERROR E0070
+    some_other_func() = 4; //~ ERROR E0070
+                           //~^ ERROR E0308
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr
new file mode 100644 (file)
index 0000000..e1316e2
--- /dev/null
@@ -0,0 +1,29 @@
+error[E0070]: invalid left-hand side expression
+  --> $DIR/E0070.rs:16:5
+   |
+16 |     SOME_CONST = 14; //~ ERROR E0070
+   |     ^^^^^^^^^^^^^^^ left-hand of expression not valid
+
+error[E0070]: invalid left-hand side expression
+  --> $DIR/E0070.rs:17:5
+   |
+17 |     1 = 3; //~ ERROR E0070
+   |     ^^^^^ left-hand of expression not valid
+
+error[E0308]: mismatched types
+  --> $DIR/E0070.rs:18:25
+   |
+18 |     some_other_func() = 4; //~ ERROR E0070
+   |                         ^ expected (), found integral variable
+   |
+   = note: expected type `()`
+              found type `{integer}`
+
+error[E0070]: invalid left-hand side expression
+  --> $DIR/E0070.rs:18:5
+   |
+18 |     some_other_func() = 4; //~ ERROR E0070
+   |     ^^^^^^^^^^^^^^^^^^^^^ left-hand of expression not valid
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/error-codes/E0071.rs b/src/test/ui/error-codes/E0071.rs
new file mode 100644 (file)
index 0000000..d71dc79
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Foo {}
+type FooAlias = Foo;
+
+fn main() {
+    let u = FooAlias { value: 0 };
+    //~^ ERROR expected struct, variant or union type, found enum `Foo` [E0071]
+}
diff --git a/src/test/ui/error-codes/E0071.stderr b/src/test/ui/error-codes/E0071.stderr
new file mode 100644 (file)
index 0000000..020dad3
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0071]: expected struct, variant or union type, found enum `Foo`
+  --> $DIR/E0071.rs:15:13
+   |
+15 |     let u = FooAlias { value: 0 };
+   |             ^^^^^^^^ not a struct
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0075.rs b/src/test/ui/error-codes/E0075.rs
new file mode 100644 (file)
index 0000000..d778390
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+
+#[repr(simd)]
+struct Bad; //~ ERROR E0075
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0075.stderr b/src/test/ui/error-codes/E0075.stderr
new file mode 100644 (file)
index 0000000..39d27d6
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0075]: SIMD vector cannot be empty
+  --> $DIR/E0075.rs:14:1
+   |
+14 | struct Bad; //~ ERROR E0075
+   | ^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0076.rs b/src/test/ui/error-codes/E0076.rs
new file mode 100644 (file)
index 0000000..b159cf1
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+
+#[repr(simd)]
+struct Bad(u16, u32, u32);
+//~^ ERROR E0076
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0076.stderr b/src/test/ui/error-codes/E0076.stderr
new file mode 100644 (file)
index 0000000..02ce479
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0076]: SIMD vector should be homogeneous
+  --> $DIR/E0076.rs:14:1
+   |
+14 | struct Bad(u16, u32, u32);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0077.rs b/src/test/ui/error-codes/E0077.rs
new file mode 100644 (file)
index 0000000..b074e90
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+
+#[repr(simd)]
+struct Bad(String); //~ ERROR E0077
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0077.stderr b/src/test/ui/error-codes/E0077.stderr
new file mode 100644 (file)
index 0000000..7e7b55f
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0077]: SIMD vector element type should be machine type
+  --> $DIR/E0077.rs:14:1
+   |
+14 | struct Bad(String); //~ ERROR E0077
+   | ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0080.rs b/src/test/ui/error-codes/E0080.rs
new file mode 100644 (file)
index 0000000..2f199c4
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Enum {
+    X = (1 << 500), //~ ERROR E0080
+    //~| WARNING shift left with overflow
+    Y = (1 / 0) //~ ERROR E0080
+    //~| WARNING divide by zero
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0080.stderr b/src/test/ui/error-codes/E0080.stderr
new file mode 100644 (file)
index 0000000..2ec2ad3
--- /dev/null
@@ -0,0 +1,28 @@
+warning: constant evaluation error: attempt to shift left with overflow
+  --> $DIR/E0080.rs:12:9
+   |
+12 |     X = (1 << 500), //~ ERROR E0080
+   |         ^^^^^^^^^^
+   |
+   = note: #[warn(const_err)] on by default
+
+error[E0080]: constant evaluation error
+  --> $DIR/E0080.rs:12:9
+   |
+12 |     X = (1 << 500), //~ ERROR E0080
+   |         ^^^^^^^^^^ attempt to shift left with overflow
+
+warning: constant evaluation error: attempt to divide by zero
+  --> $DIR/E0080.rs:14:9
+   |
+14 |     Y = (1 / 0) //~ ERROR E0080
+   |         ^^^^^^^
+
+error[E0080]: constant evaluation error
+  --> $DIR/E0080.rs:14:9
+   |
+14 |     Y = (1 / 0) //~ ERROR E0080
+   |         ^^^^^^^ attempt to divide by zero
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0081.rs b/src/test/ui/error-codes/E0081.rs
new file mode 100644 (file)
index 0000000..3b57166
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Enum {
+    P = 3,
+    X = 3,
+    //~^ ERROR discriminant value `3isize` already exists
+    Y = 5
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0081.stderr b/src/test/ui/error-codes/E0081.stderr
new file mode 100644 (file)
index 0000000..035638b
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0081]: discriminant value `3isize` already exists
+  --> $DIR/E0081.rs:13:9
+   |
+12 |     P = 3,
+   |         - first use of `3isize`
+13 |     X = 3,
+   |         ^ enum already has `3isize`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0084.rs b/src/test/ui/error-codes/E0084.rs
new file mode 100644 (file)
index 0000000..2be206c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[repr(i32)] //~ ERROR: E0084
+enum Foo {}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0084.stderr b/src/test/ui/error-codes/E0084.stderr
new file mode 100644 (file)
index 0000000..b39a129
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0084]: unsupported representation for zero-variant enum
+  --> $DIR/E0084.rs:11:1
+   |
+11 | #[repr(i32)] //~ ERROR: E0084
+   | ^^^^^^^^^^^^
+12 | enum Foo {}
+   | ----------- zero-variant enum
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0087.rs b/src/test/ui/error-codes/E0087.rs
new file mode 100644 (file)
index 0000000..6dc0886
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo() {}
+fn bar<T>() {}
+
+fn main() {
+    foo::<f64>(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087]
+
+    bar::<f64, u64>(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087]
+}
diff --git a/src/test/ui/error-codes/E0087.stderr b/src/test/ui/error-codes/E0087.stderr
new file mode 100644 (file)
index 0000000..20c8cd4
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0087]: too many type parameters provided: expected at most 0 type parameters, found 1 type parameter
+  --> $DIR/E0087.rs:15:11
+   |
+15 |     foo::<f64>(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087]
+   |           ^^^ expected 0 type parameters
+
+error[E0087]: too many type parameters provided: expected at most 1 type parameter, found 2 type parameters
+  --> $DIR/E0087.rs:17:16
+   |
+17 |     bar::<f64, u64>(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087]
+   |                ^^^ expected 1 type parameter
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0088.rs b/src/test/ui/error-codes/E0088.rs
new file mode 100644 (file)
index 0000000..db84a4e
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn f() {}
+fn g<'a>() -> &'a u8 { loop {} }
+
+fn main() {
+    f::<'static>(); //~ ERROR E0088
+    g::<'static, 'static>(); //~ ERROR E0088
+}
diff --git a/src/test/ui/error-codes/E0088.stderr b/src/test/ui/error-codes/E0088.stderr
new file mode 100644 (file)
index 0000000..615df88
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0088]: too many lifetime parameters provided: expected at most 0 lifetime parameters, found 1 lifetime parameter
+  --> $DIR/E0088.rs:15:9
+   |
+15 |     f::<'static>(); //~ ERROR E0088
+   |         ^^^^^^^ expected 0 lifetime parameters
+
+error[E0088]: too many lifetime parameters provided: expected at most 1 lifetime parameter, found 2 lifetime parameters
+  --> $DIR/E0088.rs:16:18
+   |
+16 |     g::<'static, 'static>(); //~ ERROR E0088
+   |                  ^^^^^^^ expected 1 lifetime parameter
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0089.rs b/src/test/ui/error-codes/E0089.rs
new file mode 100644 (file)
index 0000000..21df9ab
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo<T, U>() {}
+
+fn main() {
+    foo::<f64>(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089]
+}
diff --git a/src/test/ui/error-codes/E0089.stderr b/src/test/ui/error-codes/E0089.stderr
new file mode 100644 (file)
index 0000000..38b45e2
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0089]: too few type parameters provided: expected 2 type parameters, found 1 type parameter
+  --> $DIR/E0089.rs:14:5
+   |
+14 |     foo::<f64>(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089]
+   |     ^^^^^^^^^^ expected 2 type parameters
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0090.rs b/src/test/ui/error-codes/E0090.rs
new file mode 100644 (file)
index 0000000..13b2131
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo<'a: 'b, 'b: 'a>() {}
+
+fn main() {
+    foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090]
+}
diff --git a/src/test/ui/error-codes/E0090.stderr b/src/test/ui/error-codes/E0090.stderr
new file mode 100644 (file)
index 0000000..050082d
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0090]: too few lifetime parameters provided: expected 2 lifetime parameters, found 1 lifetime parameter
+  --> $DIR/E0090.rs:14:5
+   |
+14 |     foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090]
+   |     ^^^^^^^^^^^^^^ expected 2 lifetime parameters
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0091.rs b/src/test/ui/error-codes/E0091.rs
new file mode 100644 (file)
index 0000000..da988db
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+type Foo<T> = u32; //~ ERROR E0091
+type Foo2<A, B> = Box<A>; //~ ERROR E0091
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0091.stderr b/src/test/ui/error-codes/E0091.stderr
new file mode 100644 (file)
index 0000000..7d951dd
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0091]: type parameter `T` is unused
+  --> $DIR/E0091.rs:11:10
+   |
+11 | type Foo<T> = u32; //~ ERROR E0091
+   |          ^ unused type parameter
+
+error[E0091]: type parameter `B` is unused
+  --> $DIR/E0091.rs:12:14
+   |
+12 | type Foo2<A, B> = Box<A>; //~ ERROR E0091
+   |              ^ unused type parameter
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0092.rs b/src/test/ui/error-codes/E0092.rs
new file mode 100644 (file)
index 0000000..b08164a
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(intrinsics)]
+extern "rust-intrinsic" {
+    fn atomic_foo(); //~ ERROR E0092
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0092.stderr b/src/test/ui/error-codes/E0092.stderr
new file mode 100644 (file)
index 0000000..788f899
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0092]: unrecognized atomic operation function: `foo`
+  --> $DIR/E0092.rs:13:5
+   |
+13 |     fn atomic_foo(); //~ ERROR E0092
+   |     ^^^^^^^^^^^^^^^^ unrecognized atomic operation
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0093.rs b/src/test/ui/error-codes/E0093.rs
new file mode 100644 (file)
index 0000000..d84f9f6
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(intrinsics)]
+extern "rust-intrinsic" {
+    fn foo();
+    //~^ ERROR E0093
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0093.stderr b/src/test/ui/error-codes/E0093.stderr
new file mode 100644 (file)
index 0000000..959d64a
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0093]: unrecognized intrinsic function: `foo`
+  --> $DIR/E0093.rs:13:5
+   |
+13 |     fn foo();
+   |     ^^^^^^^^^ unrecognized intrinsic
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0094.rs b/src/test/ui/error-codes/E0094.rs
new file mode 100644 (file)
index 0000000..3a31874
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(intrinsics)]
+extern "rust-intrinsic" {
+    fn size_of<T, U>() -> usize; //~ ERROR E0094
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0094.stderr b/src/test/ui/error-codes/E0094.stderr
new file mode 100644 (file)
index 0000000..fdef3d8
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0094]: intrinsic has wrong number of type parameters: found 2, expected 1
+  --> $DIR/E0094.rs:13:15
+   |
+13 |     fn size_of<T, U>() -> usize; //~ ERROR E0094
+   |               ^^^^^^ expected 1 type parameter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0106.rs b/src/test/ui/error-codes/E0106.rs
new file mode 100644 (file)
index 0000000..0674930
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    x: &bool,
+    //~^ ERROR E0106
+}
+enum Bar {
+    A(u8),
+    B(&bool),
+   //~^ ERROR E0106
+}
+type MyStr = &str;
+        //~^ ERROR E0106
+
+struct Baz<'a>(&'a str);
+struct Buzz<'a, 'b>(&'a str, &'b str);
+
+struct Quux {
+    baz: Baz,
+    //~^ ERROR E0106
+    //~| expected lifetime parameter
+    buzz: Buzz,
+    //~^ ERROR E0106
+    //~| expected 2 lifetime parameters
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0106.stderr b/src/test/ui/error-codes/E0106.stderr
new file mode 100644 (file)
index 0000000..9844280
--- /dev/null
@@ -0,0 +1,32 @@
+error[E0106]: missing lifetime specifier
+  --> $DIR/E0106.rs:12:8
+   |
+12 |     x: &bool,
+   |        ^ expected lifetime parameter
+
+error[E0106]: missing lifetime specifier
+  --> $DIR/E0106.rs:17:7
+   |
+17 |     B(&bool),
+   |       ^ expected lifetime parameter
+
+error[E0106]: missing lifetime specifier
+  --> $DIR/E0106.rs:20:14
+   |
+20 | type MyStr = &str;
+   |              ^ expected lifetime parameter
+
+error[E0106]: missing lifetime specifier
+  --> $DIR/E0106.rs:27:10
+   |
+27 |     baz: Baz,
+   |          ^^^ expected lifetime parameter
+
+error[E0106]: missing lifetime specifiers
+  --> $DIR/E0106.rs:30:11
+   |
+30 |     buzz: Buzz,
+   |           ^^^^ expected 2 lifetime parameters
+
+error: aborting due to 5 previous errors
+
diff --git a/src/test/ui/error-codes/E0107.rs b/src/test/ui/error-codes/E0107.rs
new file mode 100644 (file)
index 0000000..16ebd3e
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo<'a>(&'a str);
+struct Buzz<'a, 'b>(&'a str, &'b str);
+
+enum Bar {
+    A,
+    B,
+    C,
+}
+
+struct Baz<'a, 'b, 'c> {
+    buzz: Buzz<'a>,
+    //~^ ERROR E0107
+    //~| expected 2 lifetime parameters
+    bar: Bar<'a>,
+    //~^ ERROR E0107
+    //~| unexpected lifetime parameter
+    foo2: Foo<'a, 'b, 'c>,
+    //~^ ERROR E0107
+    //~| 2 unexpected lifetime parameters
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr
new file mode 100644 (file)
index 0000000..6283486
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0107]: wrong number of lifetime parameters: expected 2, found 1
+  --> $DIR/E0107.rs:21:11
+   |
+21 |     buzz: Buzz<'a>,
+   |           ^^^^^^^^ expected 2 lifetime parameters
+
+error[E0107]: wrong number of lifetime parameters: expected 0, found 1
+  --> $DIR/E0107.rs:24:10
+   |
+24 |     bar: Bar<'a>,
+   |          ^^^^^^^ unexpected lifetime parameter
+
+error[E0107]: wrong number of lifetime parameters: expected 1, found 3
+  --> $DIR/E0107.rs:27:11
+   |
+27 |     foo2: Foo<'a, 'b, 'c>,
+   |           ^^^^^^^^^^^^^^^ 2 unexpected lifetime parameters
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0109.rs b/src/test/ui/error-codes/E0109.rs
new file mode 100644 (file)
index 0000000..9fc4784
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+type X = u32<i32>; //~ ERROR E0109
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0109.stderr b/src/test/ui/error-codes/E0109.stderr
new file mode 100644 (file)
index 0000000..59da111
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0109]: type parameters are not allowed on this type
+  --> $DIR/E0109.rs:11:14
+   |
+11 | type X = u32<i32>; //~ ERROR E0109
+   |              ^^^ type parameter not allowed
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0110.rs b/src/test/ui/error-codes/E0110.rs
new file mode 100644 (file)
index 0000000..fd169f4
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+type X = u32<'static>; //~ ERROR E0110
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0110.stderr b/src/test/ui/error-codes/E0110.stderr
new file mode 100644 (file)
index 0000000..7417351
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0110]: lifetime parameters are not allowed on this type
+  --> $DIR/E0110.rs:11:14
+   |
+11 | type X = u32<'static>; //~ ERROR E0110
+   |              ^^^^^^^ lifetime parameter not allowed on this type
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0116.rs b/src/test/ui/error-codes/E0116.rs
new file mode 100644 (file)
index 0000000..cd7d8dc
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+impl Vec<u8> {}
+//~^ ERROR E0116
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0116.stderr b/src/test/ui/error-codes/E0116.stderr
new file mode 100644 (file)
index 0000000..c090060
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined
+  --> $DIR/E0116.rs:11:1
+   |
+11 | impl Vec<u8> {}
+   | ^^^^^^^^^^^^^^^ impl for type defined outside of crate.
+   |
+   = note: define and implement a trait or new type instead
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0117.rs b/src/test/ui/error-codes/E0117.rs
new file mode 100644 (file)
index 0000000..982f875
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+impl Drop for u32 {} //~ ERROR E0117
+//~| ERROR the Drop trait may only be implemented on structures
+//~| implementing Drop requires a struct
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr
new file mode 100644 (file)
index 0000000..9856692
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0120]: the Drop trait may only be implemented on structures
+  --> $DIR/E0117.rs:11:15
+   |
+11 | impl Drop for u32 {} //~ ERROR E0117
+   |               ^^^ implementing Drop requires a struct
+
+error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
+  --> $DIR/E0117.rs:11:1
+   |
+11 | impl Drop for u32 {} //~ ERROR E0117
+   | ^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
+   |
+   = note: the impl does not reference any types defined in this crate
+   = note: define and implement a trait or new type instead
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0118.rs b/src/test/ui/error-codes/E0118.rs
new file mode 100644 (file)
index 0000000..d37ff34
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+impl (u8, u8) { //~ ERROR E0118
+    fn get_state(&self) -> String {
+        String::new()
+    }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0118.stderr b/src/test/ui/error-codes/E0118.stderr
new file mode 100644 (file)
index 0000000..8c78890
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0118]: no base type found for inherent implementation
+  --> $DIR/E0118.rs:11:6
+   |
+11 | impl (u8, u8) { //~ ERROR E0118
+   |      ^^^^^^^^ impl requires a base type
+   |
+   = note: either implement a trait on it or create a newtype to wrap it instead
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0119.rs b/src/test/ui/error-codes/E0119.rs
new file mode 100644 (file)
index 0000000..9528631
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait MyTrait {
+    fn get(&self) -> usize;
+}
+
+impl<T> MyTrait for T {
+    fn get(&self) -> usize { 0 }
+}
+
+struct Foo {
+    value: usize
+}
+
+impl MyTrait for Foo { //~ ERROR E0119
+    fn get(&self) -> usize { self.value }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0119.stderr b/src/test/ui/error-codes/E0119.stderr
new file mode 100644 (file)
index 0000000..91bb74a
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0119]: conflicting implementations of trait `MyTrait` for type `Foo`:
+  --> $DIR/E0119.rs:23:1
+   |
+15 | impl<T> MyTrait for T {
+   | --------------------- first implementation here
+...
+23 | impl MyTrait for Foo { //~ ERROR E0119
+   | ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Foo`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0120.rs b/src/test/ui/error-codes/E0120.rs
new file mode 100644 (file)
index 0000000..8d09b87
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait MyTrait { fn foo() {} }
+
+impl Drop for MyTrait {
+              //~^ ERROR E0120
+    fn drop(&mut self) {}
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0120.stderr b/src/test/ui/error-codes/E0120.stderr
new file mode 100644 (file)
index 0000000..7c666d9
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0120]: the Drop trait may only be implemented on structures
+  --> $DIR/E0120.rs:13:15
+   |
+13 | impl Drop for MyTrait {
+   |               ^^^^^^^ implementing Drop requires a struct
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0121.rs b/src/test/ui/error-codes/E0121.rs
new file mode 100644 (file)
index 0000000..b26b5f4
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo() -> _ { 5 } //~ ERROR E0121
+
+static BAR: _ = "test"; //~ ERROR E0121
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr
new file mode 100644 (file)
index 0000000..fa54d67
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures
+  --> $DIR/E0121.rs:11:13
+   |
+11 | fn foo() -> _ { 5 } //~ ERROR E0121
+   |             ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures
+  --> $DIR/E0121.rs:13:13
+   |
+13 | static BAR: _ = "test"; //~ ERROR E0121
+   |             ^ not allowed in type signatures
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0124.rs b/src/test/ui/error-codes/E0124.rs
new file mode 100644 (file)
index 0000000..3ef20c6
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    field1: i32,
+    field1: i32,
+    //~^ ERROR field `field1` is already declared [E0124]
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0124.stderr b/src/test/ui/error-codes/E0124.stderr
new file mode 100644 (file)
index 0000000..8e1ec51
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0124]: field `field1` is already declared
+  --> $DIR/E0124.rs:13:5
+   |
+12 |     field1: i32,
+   |     ----------- `field1` first declared here
+13 |     field1: i32,
+   |     ^^^^^^^^^^^ field already declared
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0128.rs b/src/test/ui/error-codes/E0128.rs
new file mode 100644 (file)
index 0000000..3707101
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo<T=U, U=()> { //~ ERROR E0128
+    field1: T,
+    field2: U,
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0128.stderr b/src/test/ui/error-codes/E0128.stderr
new file mode 100644 (file)
index 0000000..fad2d0d
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0128]: type parameters with a default cannot use forward declared identifiers
+  --> $DIR/E0128.rs:11:14
+   |
+11 | struct Foo<T=U, U=()> { //~ ERROR E0128
+   |              ^ defaulted type parameters cannot be forward declared
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0130.rs b/src/test/ui/error-codes/E0130.rs
new file mode 100644 (file)
index 0000000..d11b59c
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern {
+    fn foo((a, b): (u32, u32));
+    //~^ ERROR E0130
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0130.stderr b/src/test/ui/error-codes/E0130.stderr
new file mode 100644 (file)
index 0000000..02aebe0
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0130]: patterns aren't allowed in foreign function declarations
+  --> $DIR/E0130.rs:12:12
+   |
+12 |     fn foo((a, b): (u32, u32));
+   |            ^^^^^^ pattern not allowed in foreign function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0131.rs b/src/test/ui/error-codes/E0131.rs
new file mode 100644 (file)
index 0000000..c7e31ed
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main<T>() {
+    //~^ ERROR E0131
+}
diff --git a/src/test/ui/error-codes/E0131.stderr b/src/test/ui/error-codes/E0131.stderr
new file mode 100644 (file)
index 0000000..d97e00f
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0131]: main function is not allowed to have type parameters
+  --> $DIR/E0131.rs:11:8
+   |
+11 | fn main<T>() {
+   |        ^^^ main cannot have type parameters
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0132.rs b/src/test/ui/error-codes/E0132.rs
new file mode 100644 (file)
index 0000000..25ccb34
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(start)]
+
+#[start]
+fn f< T >() {} //~ ERROR E0132
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0132.stderr b/src/test/ui/error-codes/E0132.stderr
new file mode 100644 (file)
index 0000000..5c66d67
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0132]: start function is not allowed to have type parameters
+  --> $DIR/E0132.rs:14:5
+   |
+14 | fn f< T >() {} //~ ERROR E0132
+   |     ^^^^^ start function cannot have type parameters
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0133.rs b/src/test/ui/error-codes/E0133.rs
new file mode 100644 (file)
index 0000000..2e54f65
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+unsafe fn f() { return; }
+
+fn main() {
+    f();
+    //~^ ERROR E0133
+}
diff --git a/src/test/ui/error-codes/E0133.stderr b/src/test/ui/error-codes/E0133.stderr
new file mode 100644 (file)
index 0000000..4d2ebd1
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0133]: call to unsafe function requires unsafe function or block
+  --> $DIR/E0133.rs:14:5
+   |
+14 |     f();
+   |     ^^^ call to unsafe function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0137.rs b/src/test/ui/error-codes/E0137.rs
new file mode 100644 (file)
index 0000000..067ebcc
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(main)]
+
+#[main]
+fn foo() {}
+
+#[main]
+fn f() {}
+//~^ ERROR E0137
diff --git a/src/test/ui/error-codes/E0137.stderr b/src/test/ui/error-codes/E0137.stderr
new file mode 100644 (file)
index 0000000..bc6bbff
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0137]: multiple functions with a #[main] attribute
+  --> $DIR/E0137.rs:17:1
+   |
+14 | fn foo() {}
+   | ----------- first #[main] function
+...
+17 | fn f() {}
+   | ^^^^^^^^^ additional #[main] function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0138.rs b/src/test/ui/error-codes/E0138.rs
new file mode 100644 (file)
index 0000000..856616c
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(start)]
+
+#[start]
+fn foo(argc: isize, argv: *const *const u8) -> isize { 0 }
+
+#[start]
+fn f(argc: isize, argv: *const *const u8) -> isize { 0 }
+//~^ ERROR E0138
diff --git a/src/test/ui/error-codes/E0138.stderr b/src/test/ui/error-codes/E0138.stderr
new file mode 100644 (file)
index 0000000..cee7cc5
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0138]: multiple 'start' functions
+  --> $DIR/E0138.rs:17:1
+   |
+14 | fn foo(argc: isize, argv: *const *const u8) -> isize { 0 }
+   | ---------------------------------------------------------- previous `start` function here
+...
+17 | fn f(argc: isize, argv: *const *const u8) -> isize { 0 }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ multiple `start` functions
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0152.rs b/src/test/ui/error-codes/E0152.rs
new file mode 100644 (file)
index 0000000..ae501b9
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(lang_items)]
+
+#[lang = "panic_fmt"]
+struct Foo; //~ ERROR E0152
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0152.stderr b/src/test/ui/error-codes/E0152.stderr
new file mode 100644 (file)
index 0000000..a1d5597
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0152]: duplicate lang item found: `panic_fmt`.
+  --> $DIR/E0152.rs:14:1
+   |
+14 | struct Foo; //~ ERROR E0152
+   | ^^^^^^^^^^^
+   |
+   = note: first defined in crate `std`.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0161.rs b/src/test/ui/error-codes/E0161.rs
new file mode 100644 (file)
index 0000000..81adf90
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(box_syntax)]
+
+fn main() {
+    let _x: Box<str> = box *"hello"; //~ ERROR E0161
+                                     //~^ ERROR E0507
+}
diff --git a/src/test/ui/error-codes/E0161.stderr b/src/test/ui/error-codes/E0161.stderr
new file mode 100644 (file)
index 0000000..9914fdd
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0161]: cannot move a value of type str: the size of str cannot be statically determined
+  --> $DIR/E0161.rs:14:28
+   |
+14 |     let _x: Box<str> = box *"hello"; //~ ERROR E0161
+   |                            ^^^^^^^^
+
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/E0161.rs:14:28
+   |
+14 |     let _x: Box<str> = box *"hello"; //~ ERROR E0161
+   |                            ^^^^^^^^ cannot move out of borrowed content
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0162.rs b/src/test/ui/error-codes/E0162.rs
new file mode 100644 (file)
index 0000000..e13b0af
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Irrefutable(i32);
+
+fn main() {
+    let irr = Irrefutable(0);
+    if let Irrefutable(x) = irr { //~ ERROR E0162
+        println!("{}", x);
+    }
+}
diff --git a/src/test/ui/error-codes/E0162.stderr b/src/test/ui/error-codes/E0162.stderr
new file mode 100644 (file)
index 0000000..318a023
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0162]: irrefutable if-let pattern
+  --> $DIR/E0162.rs:15:12
+   |
+15 |     if let Irrefutable(x) = irr { //~ ERROR E0162
+   |            ^^^^^^^^^^^^^^ irrefutable pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0164.rs b/src/test/ui/error-codes/E0164.rs
new file mode 100644 (file)
index 0000000..a7f10dd
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+enum Foo {}
+
+impl Foo {
+    const B: u8 = 0;
+}
+
+fn bar(foo: Foo) -> u32 {
+    match foo {
+        Foo::B(i) => i, //~ ERROR E0164
+    }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0164.stderr b/src/test/ui/error-codes/E0164.stderr
new file mode 100644 (file)
index 0000000..a515c83
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0164]: expected tuple struct/variant, found associated constant `<Foo>::B`
+  --> $DIR/E0164.rs:20:9
+   |
+20 |         Foo::B(i) => i, //~ ERROR E0164
+   |         ^^^^^^^^^ not a tuple variant or struct
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0165.rs b/src/test/ui/error-codes/E0165.rs
new file mode 100644 (file)
index 0000000..142635f
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Irrefutable(i32);
+
+fn main() {
+    let irr = Irrefutable(0);
+    while let Irrefutable(x) = irr { //~ ERROR E0165
+                                     //~| irrefutable pattern
+        // ...
+    }
+}
diff --git a/src/test/ui/error-codes/E0165.stderr b/src/test/ui/error-codes/E0165.stderr
new file mode 100644 (file)
index 0000000..3c90f19
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0165]: irrefutable while-let pattern
+  --> $DIR/E0165.rs:15:15
+   |
+15 |     while let Irrefutable(x) = irr { //~ ERROR E0165
+   |               ^^^^^^^^^^^^^^ irrefutable pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0184.rs b/src/test/ui/error-codes/E0184.rs
new file mode 100644 (file)
index 0000000..5d72d00
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[derive(Copy)] //~ ERROR E0184
+struct Foo;
+
+impl Drop for Foo {
+    fn drop(&mut self) {
+    }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0184.stderr b/src/test/ui/error-codes/E0184.stderr
new file mode 100644 (file)
index 0000000..53bda3b
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor
+  --> $DIR/E0184.rs:11:10
+   |
+11 | #[derive(Copy)] //~ ERROR E0184
+   |          ^^^^ Copy not allowed on types with destructors
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0185.rs b/src/test/ui/error-codes/E0185.rs
new file mode 100644 (file)
index 0000000..0cd3d00
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn foo();
+    //~^ NOTE trait method declared without `&self`
+}
+
+struct Bar;
+
+impl Foo for Bar {
+    fn foo(&self) {}
+    //~^ ERROR E0185
+    //~| NOTE `&self` used in impl
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0185.stderr b/src/test/ui/error-codes/E0185.stderr
new file mode 100644 (file)
index 0000000..0d24a37
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0185]: method `foo` has a `&self` declaration in the impl, but not in the trait
+  --> $DIR/E0185.rs:19:5
+   |
+12 |     fn foo();
+   |     --------- trait method declared without `&self`
+...
+19 |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^ `&self` used in impl
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0186.rs b/src/test/ui/error-codes/E0186.rs
new file mode 100644 (file)
index 0000000..55a3490
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn foo(&self); //~ `&self` used in trait
+}
+
+struct Bar;
+
+impl Foo for Bar {
+    fn foo() {} //~ ERROR E0186
+    //~^ expected `&self` in impl
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0186.stderr b/src/test/ui/error-codes/E0186.stderr
new file mode 100644 (file)
index 0000000..598057d
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
+  --> $DIR/E0186.rs:18:5
+   |
+12 |     fn foo(&self); //~ `&self` used in trait
+   |     -------------- `&self` used in trait
+...
+18 |     fn foo() {} //~ ERROR E0186
+   |     ^^^^^^^^ expected `&self` in impl
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0191.rs b/src/test/ui/error-codes/E0191.rs
new file mode 100644 (file)
index 0000000..489ebb0
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Trait {
+    type Bar;
+}
+
+type Foo = Trait; //~ ERROR E0191
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr
new file mode 100644 (file)
index 0000000..8f99a6e
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified
+  --> $DIR/E0191.rs:15:12
+   |
+15 | type Foo = Trait; //~ ERROR E0191
+   |            ^^^^^ missing associated type `Bar` value
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0192.rs b/src/test/ui/error-codes/E0192.rs
new file mode 100644 (file)
index 0000000..92f5876
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(optin_builtin_traits)]
+
+trait Trait {
+    type Bar;
+}
+
+struct Foo;
+
+impl !Trait for Foo { } //~ ERROR E0192
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0192.stderr b/src/test/ui/error-codes/E0192.stderr
new file mode 100644 (file)
index 0000000..b592c87
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0192]: negative impls are only allowed for auto traits (e.g., `Send` and `Sync`)
+  --> $DIR/E0192.rs:19:1
+   |
+19 | impl !Trait for Foo { } //~ ERROR E0192
+   | ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0194.rs b/src/test/ui/error-codes/E0194.rs
new file mode 100644 (file)
index 0000000..17e0751
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo<T> {
+    fn do_something(&self) -> T;
+    fn do_something_else<T: Clone>(&self, bar: T);
+    //~^ ERROR E0194
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0194.stderr b/src/test/ui/error-codes/E0194.stderr
new file mode 100644 (file)
index 0000000..360e8c0
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0194]: type parameter `T` shadows another type parameter of the same name
+  --> $DIR/E0194.rs:13:26
+   |
+11 | trait Foo<T> {
+   |           - first `T` declared here
+12 |     fn do_something(&self) -> T;
+13 |     fn do_something_else<T: Clone>(&self, bar: T);
+   |                          ^ shadows another type parameter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0195.rs b/src/test/ui/error-codes/E0195.rs
new file mode 100644 (file)
index 0000000..4f4d7ce
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Trait {
+    fn bar<'a,'b:'a>(x: &'a str, y: &'b str);
+    //~^ NOTE lifetimes in impl do not match this method in trait
+}
+
+struct Foo;
+
+impl Trait for Foo {
+    fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195
+    //~^ NOTE lifetimes do not match method in trait
+    }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0195.stderr b/src/test/ui/error-codes/E0195.stderr
new file mode 100644 (file)
index 0000000..3cce3d0
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0195]: lifetime parameters or bounds on method `bar` do not match the trait declaration
+  --> $DIR/E0195.rs:19:5
+   |
+12 |     fn bar<'a,'b:'a>(x: &'a str, y: &'b str);
+   |     ----------------------------------------- lifetimes in impl do not match this method in trait
+...
+19 |     fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0197.rs b/src/test/ui/error-codes/E0197.rs
new file mode 100644 (file)
index 0000000..f25fa9b
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo;
+
+unsafe impl Foo { } //~ ERROR E0197
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0197.stderr b/src/test/ui/error-codes/E0197.stderr
new file mode 100644 (file)
index 0000000..277f523
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0197]: inherent impls cannot be unsafe
+  --> $DIR/E0197.rs:13:1
+   |
+13 | unsafe impl Foo { } //~ ERROR E0197
+   | ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0198.rs b/src/test/ui/error-codes/E0198.rs
new file mode 100644 (file)
index 0000000..1a779a4
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(optin_builtin_traits)]
+
+struct Foo;
+
+unsafe impl !Send for Foo { } //~ ERROR E0198
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0198.stderr b/src/test/ui/error-codes/E0198.stderr
new file mode 100644 (file)
index 0000000..a85419e
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0198]: negative impls cannot be unsafe
+  --> $DIR/E0198.rs:15:1
+   |
+15 | unsafe impl !Send for Foo { } //~ ERROR E0198
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0199.rs b/src/test/ui/error-codes/E0199.rs
new file mode 100644 (file)
index 0000000..1a5cd19
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(optin_builtin_traits)]
+
+struct Foo;
+
+trait Bar { }
+unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199]
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0199.stderr b/src/test/ui/error-codes/E0199.stderr
new file mode 100644 (file)
index 0000000..efbe066
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0199]: implementing the trait `Bar` is not unsafe
+  --> $DIR/E0199.rs:16:1
+   |
+16 | unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0200.rs b/src/test/ui/error-codes/E0200.rs
new file mode 100644 (file)
index 0000000..6bfea0e
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo;
+
+unsafe trait Bar { }
+
+impl Bar for Foo { } //~ ERROR E0200
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0200.stderr b/src/test/ui/error-codes/E0200.stderr
new file mode 100644 (file)
index 0000000..fb71da2
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0200]: the trait `Bar` requires an `unsafe impl` declaration
+  --> $DIR/E0200.rs:15:1
+   |
+15 | impl Bar for Foo { } //~ ERROR E0200
+   | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0201.rs b/src/test/ui/error-codes/E0201.rs
new file mode 100644 (file)
index 0000000..ff6cb55
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo(u8);
+
+impl Foo {
+    fn bar(&self) -> bool { self.0 > 5 }
+    fn bar() {} //~ ERROR E0201
+}
+
+trait Baz {
+    type Quux;
+    fn baz(&self) -> bool;
+}
+
+impl Baz for Foo {
+    type Quux = u32;
+
+    fn baz(&self) -> bool { true }
+    fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201
+    type Quux = u32; //~ ERROR E0201
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0201.stderr b/src/test/ui/error-codes/E0201.stderr
new file mode 100644 (file)
index 0000000..01dbee6
--- /dev/null
@@ -0,0 +1,27 @@
+error[E0201]: duplicate definitions with name `bar`:
+  --> $DIR/E0201.rs:15:5
+   |
+14 |     fn bar(&self) -> bool { self.0 > 5 }
+   |     ------------------------------------ previous definition of `bar` here
+15 |     fn bar() {} //~ ERROR E0201
+   |     ^^^^^^^^^^^ duplicate definition
+
+error[E0201]: duplicate definitions with name `baz`:
+  --> $DIR/E0201.rs:27:5
+   |
+26 |     fn baz(&self) -> bool { true }
+   |     ------------------------------ previous definition of `baz` here
+27 |     fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition
+
+error[E0201]: duplicate definitions with name `Quux`:
+  --> $DIR/E0201.rs:28:5
+   |
+24 |     type Quux = u32;
+   |     ---------------- previous definition of `Quux` here
+...
+28 |     type Quux = u32; //~ ERROR E0201
+   |     ^^^^^^^^^^^^^^^^ duplicate definition
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0206.rs b/src/test/ui/error-codes/E0206.rs
new file mode 100644 (file)
index 0000000..da0370b
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+type Foo = i32;
+
+impl Copy for Foo { }
+//~^ ERROR the trait `Copy` may not be implemented for this type
+//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
+
+#[derive(Copy, Clone)]
+struct Bar;
+
+impl Copy for &'static Bar { }
+//~^ ERROR the trait `Copy` may not be implemented for this type
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0206.stderr b/src/test/ui/error-codes/E0206.stderr
new file mode 100644 (file)
index 0000000..8eeb94a
--- /dev/null
@@ -0,0 +1,23 @@
+error[E0206]: the trait `Copy` may not be implemented for this type
+  --> $DIR/E0206.rs:13:15
+   |
+13 | impl Copy for Foo { }
+   |               ^^^ type is not a structure or enumeration
+
+error[E0206]: the trait `Copy` may not be implemented for this type
+  --> $DIR/E0206.rs:20:15
+   |
+20 | impl Copy for &'static Bar { }
+   |               ^^^^^^^^^^^^ type is not a structure or enumeration
+
+error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
+  --> $DIR/E0206.rs:13:1
+   |
+13 | impl Copy for Foo { }
+   | ^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
+   |
+   = note: the impl does not reference any types defined in this crate
+   = note: define and implement a trait or new type instead
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0207.rs b/src/test/ui/error-codes/E0207.rs
new file mode 100644 (file)
index 0000000..bd87dba
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo;
+
+impl<T: Default> Foo { //~ ERROR E0207
+    fn get(&self) -> T {
+        <T as Default>::default()
+    }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0207.stderr b/src/test/ui/error-codes/E0207.stderr
new file mode 100644 (file)
index 0000000..35f9109
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/E0207.rs:13:6
+   |
+13 | impl<T: Default> Foo { //~ ERROR E0207
+   |      ^ unconstrained type parameter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0214.rs b/src/test/ui/error-codes/E0214.rs
new file mode 100644 (file)
index 0000000..2b09039
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let v: Vec(&str) = vec!["foo"];
+    //~^ ERROR E0214
+}
diff --git a/src/test/ui/error-codes/E0214.stderr b/src/test/ui/error-codes/E0214.stderr
new file mode 100644 (file)
index 0000000..30f5b96
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0214]: parenthesized parameters may only be used with a trait
+  --> $DIR/E0214.rs:12:15
+   |
+12 |     let v: Vec(&str) = vec!["foo"];
+   |               ^^^^^^ only traits may use parentheses
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0220.rs b/src/test/ui/error-codes/E0220.rs
new file mode 100644 (file)
index 0000000..2866ffc
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Trait {
+    type Bar;
+}
+
+type Foo = Trait<F=i32>; //~ ERROR E0220
+                         //~| ERROR E0191
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr
new file mode 100644 (file)
index 0000000..70b017b
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0220]: associated type `F` not found for `Trait`
+  --> $DIR/E0220.rs:15:18
+   |
+15 | type Foo = Trait<F=i32>; //~ ERROR E0220
+   |                  ^^^^^ associated type `F` not found
+
+error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified
+  --> $DIR/E0220.rs:15:12
+   |
+15 | type Foo = Trait<F=i32>; //~ ERROR E0220
+   |            ^^^^^^^^^^^^ missing associated type `Bar` value
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0221.rs b/src/test/ui/error-codes/E0221.rs
new file mode 100644 (file)
index 0000000..9909246
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait T1 {}
+trait T2 {}
+
+trait Foo {
+    type A: T1;
+}
+
+trait Bar : Foo {
+    type A: T2;
+    fn do_something() {
+        let _: Self::A;
+        //~^ ERROR E0221
+    }
+}
+
+trait T3 {}
+
+trait My : std::str::FromStr {
+    type Err: T3;
+    fn test() {
+        let _: Self::Err;
+        //~^ ERROR E0221
+    }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0221.stderr b/src/test/ui/error-codes/E0221.stderr
new file mode 100644 (file)
index 0000000..3dd9393
--- /dev/null
@@ -0,0 +1,29 @@
+error[E0221]: ambiguous associated type `A` in bounds of `Self`
+  --> $DIR/E0221.rs:21:16
+   |
+15 |     type A: T1;
+   |     ----------- ambiguous `A` from `Foo`
+...
+19 |     type A: T2;
+   |     ----------- ambiguous `A` from `Bar`
+20 |     fn do_something() {
+21 |         let _: Self::A;
+   |                ^^^^^^^ ambiguous associated type `A`
+
+error[E0221]: ambiguous associated type `Err` in bounds of `Self`
+  --> $DIR/E0221.rs:31:16
+   |
+29 |     type Err: T3;
+   |     ------------- ambiguous `Err` from `My`
+30 |     fn test() {
+31 |         let _: Self::Err;
+   |                ^^^^^^^^^ ambiguous associated type `Err`
+   |
+note: associated type `Self` could derive from `std::str::FromStr`
+  --> $DIR/E0221.rs:31:16
+   |
+31 |         let _: Self::Err;
+   |                ^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0223.rs b/src/test/ui/error-codes/E0223.rs
new file mode 100644 (file)
index 0000000..0683197
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait MyTrait { type X; }
+
+fn main() {
+    let foo: MyTrait::X;
+    //~^ ERROR ambiguous associated type
+}
diff --git a/src/test/ui/error-codes/E0223.stderr b/src/test/ui/error-codes/E0223.stderr
new file mode 100644 (file)
index 0000000..efd0d78
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0223]: ambiguous associated type
+  --> $DIR/E0223.rs:14:14
+   |
+14 |     let foo: MyTrait::X;
+   |              ^^^^^^^^^^ ambiguous associated type
+   |
+   = note: specify the type using the syntax `<Type as MyTrait>::X`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0225.rs b/src/test/ui/error-codes/E0225.rs
new file mode 100644 (file)
index 0000000..6c77443
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let _: Box<std::io::Read + std::io::Write>;
+    //~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
+}
diff --git a/src/test/ui/error-codes/E0225.stderr b/src/test/ui/error-codes/E0225.stderr
new file mode 100644 (file)
index 0000000..35d40cb
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0225]: only auto traits can be used as additional traits in a trait object
+  --> $DIR/E0225.rs:12:32
+   |
+12 |     let _: Box<std::io::Read + std::io::Write>;
+   |                                ^^^^^^^^^^^^^^ non-auto additional trait
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0229.rs b/src/test/ui/error-codes/E0229.rs
new file mode 100644 (file)
index 0000000..b70fb09
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Foo {
+    type A;
+    fn boo(&self) -> <Self as Foo>::A;
+}
+
+struct Bar;
+
+impl Foo for isize {
+    type A = usize;
+    fn boo(&self) -> usize { 42 }
+}
+
+fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
+//~^ ERROR associated type bindings are not allowed here [E0229]
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0229.stderr b/src/test/ui/error-codes/E0229.stderr
new file mode 100644 (file)
index 0000000..6d88ef8
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/E0229.rs:23:25
+   |
+23 | fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
+   |                         ^^^^^ associated type not allowed here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0232.rs b/src/test/ui/error-codes/E0232.rs
new file mode 100644 (file)
index 0000000..04657c6
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(on_unimplemented)]
+
+#[rustc_on_unimplemented]
+//~^ ERROR E0232
+trait Bar {}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0232.stderr b/src/test/ui/error-codes/E0232.stderr
new file mode 100644 (file)
index 0000000..e13ba62
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0232]: `#[rustc_on_unimplemented]` requires a value
+  --> $DIR/E0232.rs:13:1
+   |
+13 | #[rustc_on_unimplemented]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ value required here
+   |
+   = note: eg `#[rustc_on_unimplemented = "foo"]`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0243.rs b/src/test/ui/error-codes/E0243.rs
new file mode 100644 (file)
index 0000000..615ce0b
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo<T> { x: T }
+struct Bar { x: Foo }
+                //~^ ERROR wrong number of type arguments: expected 1, found 0 [E0243]
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0243.stderr b/src/test/ui/error-codes/E0243.stderr
new file mode 100644 (file)
index 0000000..82a90ff
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0243]: wrong number of type arguments: expected 1, found 0
+  --> $DIR/E0243.rs:12:17
+   |
+12 | struct Bar { x: Foo }
+   |                 ^^^ expected 1 type argument
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0244.rs b/src/test/ui/error-codes/E0244.rs
new file mode 100644 (file)
index 0000000..9a78b31
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo { x: bool }
+struct Bar<S, T> { x: Foo<S, T> }
+                      //~^ ERROR wrong number of type arguments: expected 0, found 2 [E0244]
+
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0244.stderr b/src/test/ui/error-codes/E0244.stderr
new file mode 100644 (file)
index 0000000..d873fbe
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0244]: wrong number of type arguments: expected 0, found 2
+  --> $DIR/E0244.rs:12:23
+   |
+12 | struct Bar<S, T> { x: Foo<S, T> }
+   |                       ^^^^^^^^^ expected no type arguments
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0252.rs b/src/test/ui/error-codes/E0252.rs
new file mode 100644 (file)
index 0000000..6b353c8
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use foo::baz;
+use bar::baz; //~ ERROR E0252
+
+mod foo {
+    pub struct baz;
+}
+
+mod bar {
+    pub mod baz {}
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0252.stderr b/src/test/ui/error-codes/E0252.stderr
new file mode 100644 (file)
index 0000000..f63597d
--- /dev/null
@@ -0,0 +1,16 @@
+error[E0252]: the name `baz` is defined multiple times
+  --> $DIR/E0252.rs:12:5
+   |
+11 | use foo::baz;
+   |     -------- previous import of the type `baz` here
+12 | use bar::baz; //~ ERROR E0252
+   |     ^^^^^^^^ `baz` reimported here
+   |
+   = note: `baz` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+12 | use bar::baz as other_baz; //~ ERROR E0252
+   |     ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0253.rs b/src/test/ui/error-codes/E0253.rs
new file mode 100644 (file)
index 0000000..186d901
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod foo {
+    pub trait MyTrait {
+        fn do_something();
+    }
+}
+
+use foo::MyTrait::do_something;
+    //~^ ERROR E0253
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0253.stderr b/src/test/ui/error-codes/E0253.stderr
new file mode 100644 (file)
index 0000000..e5a3115
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0253]: `do_something` is not directly importable
+  --> $DIR/E0253.rs:17:5
+   |
+17 | use foo::MyTrait::do_something;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be imported directly
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0254.rs b/src/test/ui/error-codes/E0254.rs
new file mode 100644 (file)
index 0000000..46c74fe
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(alloc)]
+#![allow(unused_extern_crates)]
+
+extern crate alloc;
+
+mod foo {
+    pub trait alloc {
+        fn do_something();
+    }
+}
+
+use foo::alloc;
+//~^ ERROR E0254
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0254.stderr b/src/test/ui/error-codes/E0254.stderr
new file mode 100644 (file)
index 0000000..4181c7b
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0254]: the name `alloc` is defined multiple times
+  --> $DIR/E0254.rs:22:5
+   |
+14 | extern crate alloc;
+   | ------------------- previous import of the extern crate `alloc` here
+...
+22 | use foo::alloc;
+   |     ^^^^^^^^^^ `alloc` reimported here
+   |
+   = note: `alloc` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+22 | use foo::alloc as other_alloc;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0255.rs b/src/test/ui/error-codes/E0255.rs
new file mode 100644 (file)
index 0000000..e05c6be
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use bar::foo;
+
+fn foo() {} //~ ERROR E0255
+
+mod bar {
+     pub fn foo() {}
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0255.stderr b/src/test/ui/error-codes/E0255.stderr
new file mode 100644 (file)
index 0000000..924ac49
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0255]: the name `foo` is defined multiple times
+  --> $DIR/E0255.rs:13:1
+   |
+11 | use bar::foo;
+   |     -------- previous import of the value `foo` here
+12 | 
+13 | fn foo() {} //~ ERROR E0255
+   | ^^^^^^^^ `foo` redefined here
+   |
+   = note: `foo` must be defined only once in the value namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+11 | use bar::foo as other_foo;
+   |     ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0259.rs b/src/test/ui/error-codes/E0259.rs
new file mode 100644 (file)
index 0000000..5a47541
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(alloc, libc)]
+#![allow(unused_extern_crates)]
+
+extern crate alloc;
+
+extern crate libc as alloc;
+//~^ ERROR E0259
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0259.stderr b/src/test/ui/error-codes/E0259.stderr
new file mode 100644 (file)
index 0000000..e05e4e1
--- /dev/null
@@ -0,0 +1,16 @@
+error[E0259]: the name `alloc` is defined multiple times
+  --> $DIR/E0259.rs:16:1
+   |
+14 | extern crate alloc;
+   | ------------------- previous import of the extern crate `alloc` here
+15 | 
+16 | extern crate libc as alloc;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | |
+   | `alloc` reimported here
+   | You can use `as` to change the binding name of the import
+   |
+   = note: `alloc` must be defined only once in the type namespace of this module
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0260.rs b/src/test/ui/error-codes/E0260.rs
new file mode 100644 (file)
index 0000000..1b01bb1
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(alloc)]
+#![allow(unused_extern_crates)]
+
+extern crate alloc;
+
+mod alloc {
+//~^ ERROR the name `alloc` is defined multiple times [E0260]
+    pub trait MyTrait {
+        fn do_something();
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0260.stderr b/src/test/ui/error-codes/E0260.stderr
new file mode 100644 (file)
index 0000000..3d899e6
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0260]: the name `alloc` is defined multiple times
+  --> $DIR/E0260.rs:16:1
+   |
+14 | extern crate alloc;
+   | ------------------- previous import of the extern crate `alloc` here
+15 | 
+16 | mod alloc {
+   | ^^^^^^^^^ `alloc` redefined here
+   |
+   = note: `alloc` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+14 | extern crate alloc as other_alloc;
+   |
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0261.rs b/src/test/ui/error-codes/E0261.rs
new file mode 100644 (file)
index 0000000..558c1c3
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo(x: &'a str) { } //~ ERROR E0261
+                       //~| undeclared lifetime
+
+struct Foo {
+    x: &'a str, //~ ERROR E0261
+                //~| undeclared lifetime
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0261.stderr b/src/test/ui/error-codes/E0261.stderr
new file mode 100644 (file)
index 0000000..c8dd082
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/E0261.rs:11:12
+   |
+11 | fn foo(x: &'a str) { } //~ ERROR E0261
+   |            ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/E0261.rs:15:9
+   |
+15 |     x: &'a str, //~ ERROR E0261
+   |         ^^ undeclared lifetime
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0262.rs b/src/test/ui/error-codes/E0262.rs
new file mode 100644 (file)
index 0000000..41b6aca
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo<'static>(x: &'static str) { } //~ ERROR E0262
+                                     //~| 'static is a reserved lifetime name
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0262.stderr b/src/test/ui/error-codes/E0262.stderr
new file mode 100644 (file)
index 0000000..0910009
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0262]: invalid lifetime parameter name: `'static`
+  --> $DIR/E0262.rs:11:8
+   |
+11 | fn foo<'static>(x: &'static str) { } //~ ERROR E0262
+   |        ^^^^^^^ 'static is a reserved lifetime name
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0263.rs b/src/test/ui/error-codes/E0263.rs
new file mode 100644 (file)
index 0000000..722f1c2
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) {
+    //~^ ERROR E0263
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0263.stderr b/src/test/ui/error-codes/E0263.stderr
new file mode 100644 (file)
index 0000000..942718d
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0263]: lifetime name `'a` declared twice in the same scope
+  --> $DIR/E0263.rs:11:16
+   |
+11 | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) {
+   |        --      ^^ declared twice
+   |        |
+   |        previous declaration here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0264.rs b/src/test/ui/error-codes/E0264.rs
new file mode 100644 (file)
index 0000000..9233297
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(lang_items)]
+
+extern "C" {
+    #[lang = "cake"]
+    fn cake(); //~ ERROR E0264
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0264.stderr b/src/test/ui/error-codes/E0264.stderr
new file mode 100644 (file)
index 0000000..b104946
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0264]: unknown external lang item: `cake`
+  --> $DIR/E0264.rs:15:5
+   |
+15 |     fn cake(); //~ ERROR E0264
+   |     ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0267.rs b/src/test/ui/error-codes/E0267.rs
new file mode 100644 (file)
index 0000000..6287256
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let w = || { break; }; //~ ERROR E0267
+}
diff --git a/src/test/ui/error-codes/E0267.stderr b/src/test/ui/error-codes/E0267.stderr
new file mode 100644 (file)
index 0000000..2f6d9c7
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0267]: `break` inside of a closure
+  --> $DIR/E0267.rs:12:18
+   |
+12 |     let w = || { break; }; //~ ERROR E0267
+   |                  ^^^^^ cannot break inside of a closure
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0268.rs b/src/test/ui/error-codes/E0268.rs
new file mode 100644 (file)
index 0000000..41e88e2
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    break; //~ ERROR E0268
+}
diff --git a/src/test/ui/error-codes/E0268.stderr b/src/test/ui/error-codes/E0268.stderr
new file mode 100644 (file)
index 0000000..cf89e46
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0268]: `break` outside of loop
+  --> $DIR/E0268.rs:12:5
+   |
+12 |     break; //~ ERROR E0268
+   |     ^^^^^ cannot break outside of a loop
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0271.rs b/src/test/ui/error-codes/E0271.rs
new file mode 100644 (file)
index 0000000..d322c8b
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Trait { type AssociatedType; }
+
+fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
+    println!("in foo");
+}
+
+impl Trait for i8 { type AssociatedType = &'static str; }
+
+fn main() {
+    foo(3_i8); //~ ERROR E0271
+}
diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr
new file mode 100644 (file)
index 0000000..c596b56
--- /dev/null
@@ -0,0 +1,16 @@
+error[E0271]: type mismatch resolving `<i8 as Trait>::AssociatedType == u32`
+  --> $DIR/E0271.rs:20:5
+   |
+20 |     foo(3_i8); //~ ERROR E0271
+   |     ^^^ expected reference, found u32
+   |
+   = note: expected type `&'static str`
+              found type `u32`
+note: required by `foo`
+  --> $DIR/E0271.rs:13:1
+   |
+13 | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0275.rs b/src/test/ui/error-codes/E0275.rs
new file mode 100644 (file)
index 0000000..8dfd1d9
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {}
+
+struct Bar<T>(T);
+
+impl<T> Foo for T where Bar<T>: Foo {} //~ ERROR E0275
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0275.stderr b/src/test/ui/error-codes/E0275.stderr
new file mode 100644 (file)
index 0000000..2dbe5be
--- /dev/null
@@ -0,0 +1,79 @@
+error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: std::marker::Sized`
+  --> $DIR/E0275.rs:15:1
+   |
+15 | impl<T> Foo for T where Bar<T>: Foo {} //~ ERROR E0275
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: consider adding a `#![recursion_limit="128"]` attribute to your crate
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<T>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<T>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<T>>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<Bar<T>>`
+   = note: required because of the requirements on the impl of `Foo` for `Bar<T>`
+note: required by `Foo`
+  --> $DIR/E0275.rs:11:1
+   |
+11 | trait Foo {}
+   | ^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0276.rs b/src/test/ui/error-codes/E0276.rs
new file mode 100644 (file)
index 0000000..62e43b0
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn foo<T>(x: T);
+}
+
+impl Foo for bool {
+    fn foo<T>(x: T) where T: Copy {} //~ ERROR E0276
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0276.stderr b/src/test/ui/error-codes/E0276.stderr
new file mode 100644 (file)
index 0000000..bcbe81a
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0276]: impl has stricter requirements than trait
+  --> $DIR/E0276.rs:16:5
+   |
+12 |     fn foo<T>(x: T);
+   |     ---------------- definition of `foo` from trait
+...
+16 |     fn foo<T>(x: T) where T: Copy {} //~ ERROR E0276
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::marker::Copy`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0277-2.rs b/src/test/ui/error-codes/E0277-2.rs
new file mode 100644 (file)
index 0000000..4d1c500
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    bar: Bar
+}
+
+struct Bar {
+    baz: Baz
+}
+
+struct Baz {
+    x: *const u8
+}
+
+fn is_send<T: Send>() { }
+
+fn main() {
+    is_send::<Foo>();
+    //~^ ERROR the trait bound `*const u8: std::marker::Send` is not satisfied in `Foo`
+}
diff --git a/src/test/ui/error-codes/E0277-2.stderr b/src/test/ui/error-codes/E0277-2.stderr
new file mode 100644 (file)
index 0000000..6a0f21e
--- /dev/null
@@ -0,0 +1,18 @@
+error[E0277]: the trait bound `*const u8: std::marker::Send` is not satisfied in `Foo`
+  --> $DIR/E0277-2.rs:26:5
+   |
+26 |     is_send::<Foo>();
+   |     ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely
+   |
+   = help: within `Foo`, the trait `std::marker::Send` is not implemented for `*const u8`
+   = note: required because it appears within the type `Baz`
+   = note: required because it appears within the type `Bar`
+   = note: required because it appears within the type `Foo`
+note: required by `is_send`
+  --> $DIR/E0277-2.rs:23:1
+   |
+23 | fn is_send<T: Send>() { }
+   | ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0277.rs b/src/test/ui/error-codes/E0277.rs
new file mode 100644 (file)
index 0000000..b29e435
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-cloudabi no std::path
+
+use std::path::Path;
+
+trait Foo {
+    fn bar(&self);
+}
+
+fn some_func<T: Foo>(foo: T) {
+    foo.bar();
+}
+
+fn f(p: Path) { }
+//~^ ERROR the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path`
+
+fn main() {
+    some_func(5i32);
+    //~^ ERROR the trait bound `i32: Foo` is not satisfied
+}
diff --git a/src/test/ui/error-codes/E0277.stderr b/src/test/ui/error-codes/E0277.stderr
new file mode 100644 (file)
index 0000000..38d14ed
--- /dev/null
@@ -0,0 +1,24 @@
+error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path`
+  --> $DIR/E0277.rs:23:6
+   |
+23 | fn f(p: Path) { }
+   |      ^ `[u8]` does not have a constant size known at compile-time
+   |
+   = help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
+   = note: required because it appears within the type `std::path::Path`
+   = note: all local variables must have a statically known size
+
+error[E0277]: the trait bound `i32: Foo` is not satisfied
+  --> $DIR/E0277.rs:27:5
+   |
+27 |     some_func(5i32);
+   |     ^^^^^^^^^ the trait `Foo` is not implemented for `i32`
+   |
+note: required by `some_func`
+  --> $DIR/E0277.rs:19:1
+   |
+19 | fn some_func<T: Foo>(foo: T) {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0282.rs b/src/test/ui/error-codes/E0282.rs
new file mode 100644 (file)
index 0000000..dfc7026
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = "hello".chars().rev().collect(); //~ ERROR E0282
+}
diff --git a/src/test/ui/error-codes/E0282.stderr b/src/test/ui/error-codes/E0282.stderr
new file mode 100644 (file)
index 0000000..8351627
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0282]: type annotations needed
+  --> $DIR/E0282.rs:12:9
+   |
+12 |     let x = "hello".chars().rev().collect(); //~ ERROR E0282
+   |         ^
+   |         |
+   |         cannot infer type for `_`
+   |         consider giving `x` a type
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0283.rs b/src/test/ui/error-codes/E0283.rs
new file mode 100644 (file)
index 0000000..844c47f
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Generator {
+    fn create() -> u32;
+}
+
+struct Impl;
+
+impl Generator for Impl {
+    fn create() -> u32 { 1 }
+}
+
+struct AnotherImpl;
+
+impl Generator for AnotherImpl {
+    fn create() -> u32 { 2 }
+}
+
+fn main() {
+    let cont: u32 = Generator::create(); //~ ERROR E0283
+}
diff --git a/src/test/ui/error-codes/E0283.stderr b/src/test/ui/error-codes/E0283.stderr
new file mode 100644 (file)
index 0000000..9fdb6b1
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0283]: type annotations required: cannot resolve `_: Generator`
+  --> $DIR/E0283.rs:28:21
+   |
+28 |     let cont: u32 = Generator::create(); //~ ERROR E0283
+   |                     ^^^^^^^^^^^^^^^^^
+   |
+note: required by `Generator::create`
+  --> $DIR/E0283.rs:12:5
+   |
+12 |     fn create() -> u32;
+   |     ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0296.rs b/src/test/ui/error-codes/E0296.rs
new file mode 100644 (file)
index 0000000..562fd00
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![recursion_limit] //~ ERROR E0296
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0296.stderr b/src/test/ui/error-codes/E0296.stderr
new file mode 100644 (file)
index 0000000..f6a2adc
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0296]: malformed recursion limit attribute, expected #![recursion_limit="N"]
+  --> $DIR/E0296.rs:11:1
+   |
+11 | #![recursion_limit] //~ ERROR E0296
+   | ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0297.rs b/src/test/ui/error-codes/E0297.rs
new file mode 100644 (file)
index 0000000..afe4444
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let xs : Vec<Option<i32>> = vec![Some(1), None];
+
+    for Some(x) in xs {}
+    //~^ ERROR E0005
+}
diff --git a/src/test/ui/error-codes/E0297.stderr b/src/test/ui/error-codes/E0297.stderr
new file mode 100644 (file)
index 0000000..2dfed66
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0005]: refutable pattern in `for` loop binding: `None` not covered
+  --> $DIR/E0297.rs:14:9
+   |
+14 |     for Some(x) in xs {}
+   |         ^^^^^^^ pattern `None` not covered
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0301.rs b/src/test/ui/error-codes/E0301.rs
new file mode 100644 (file)
index 0000000..06e9828
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    match Some(()) {
+        None => { },
+        option if option.take().is_none() => {}, //~ ERROR E0301
+        Some(_) => { }
+    }
+}
diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr
new file mode 100644 (file)
index 0000000..ff4ee32
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0301]: cannot mutably borrow in a pattern guard
+  --> $DIR/E0301.rs:14:19
+   |
+14 |         option if option.take().is_none() => {}, //~ ERROR E0301
+   |                   ^^^^^^ borrowed mutably in pattern guard
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0302.rs b/src/test/ui/error-codes/E0302.rs
new file mode 100644 (file)
index 0000000..6a5ad40
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    match Some(()) {
+        None => { },
+        option if { option = None; false } => { }, //~ ERROR E0302
+        Some(_) => { }
+    }
+}
diff --git a/src/test/ui/error-codes/E0302.stderr b/src/test/ui/error-codes/E0302.stderr
new file mode 100644 (file)
index 0000000..c7b33a4
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0302]: cannot assign in a pattern guard
+  --> $DIR/E0302.rs:14:21
+   |
+14 |         option if { option = None; false } => { }, //~ ERROR E0302
+   |                     ^^^^^^^^^^^^^ assignment in pattern guard
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0303.rs b/src/test/ui/error-codes/E0303.rs
new file mode 100644 (file)
index 0000000..6027414
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    match Some("hi".to_string()) {
+        ref op_string_ref @ Some(s) => {},
+        //~^ ERROR pattern bindings are not allowed after an `@` [E0303]
+        //~| ERROR E0009
+        None => {},
+    }
+}
diff --git a/src/test/ui/error-codes/E0303.stderr b/src/test/ui/error-codes/E0303.stderr
new file mode 100644 (file)
index 0000000..6528c97
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0009]: cannot bind by-move and by-ref in the same pattern
+  --> $DIR/E0303.rs:13:34
+   |
+13 |         ref op_string_ref @ Some(s) => {},
+   |         -------------------------^-
+   |         |                        |
+   |         |                        by-move pattern here
+   |         both by-ref and by-move used
+
+error[E0303]: pattern bindings are not allowed after an `@`
+  --> $DIR/E0303.rs:13:34
+   |
+13 |         ref op_string_ref @ Some(s) => {},
+   |                                  ^ not allowed after `@`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0308-4.rs b/src/test/ui/error-codes/E0308-4.rs
new file mode 100644 (file)
index 0000000..bb4cd14
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = 1u8;
+    match x {
+        0u8...3i8 => (), //~ ERROR E0308
+        _ => ()
+    }
+}
diff --git a/src/test/ui/error-codes/E0308-4.stderr b/src/test/ui/error-codes/E0308-4.stderr
new file mode 100644 (file)
index 0000000..1e4beea
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0308]: mismatched types
+  --> $DIR/E0308-4.rs:14:9
+   |
+14 |         0u8...3i8 => (), //~ ERROR E0308
+   |         ^^^^^^^^^ expected u8, found i8
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0308.rs b/src/test/ui/error-codes/E0308.rs
new file mode 100644 (file)
index 0000000..078f1d3
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(intrinsics)]
+
+extern "rust-intrinsic" {
+    fn size_of<T>(); //~ ERROR E0308
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0308.stderr b/src/test/ui/error-codes/E0308.stderr
new file mode 100644 (file)
index 0000000..905b021
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0308]: intrinsic has wrong type
+  --> $DIR/E0308.rs:14:5
+   |
+14 |     fn size_of<T>(); //~ ERROR E0308
+   |     ^^^^^^^^^^^^^^^^ expected (), found usize
+   |
+   = note: expected type `unsafe extern "rust-intrinsic" fn()`
+              found type `unsafe extern "rust-intrinsic" fn() -> usize`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0365.rs b/src/test/ui/error-codes/E0365.rs
new file mode 100644 (file)
index 0000000..18a72b0
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod foo {
+    pub const X: u32 = 1;
+}
+
+pub use foo as foo2;
+//~^ ERROR `foo` is private, and cannot be re-exported [E0365]
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0365.stderr b/src/test/ui/error-codes/E0365.stderr
new file mode 100644 (file)
index 0000000..ccb1385
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0365]: `foo` is private, and cannot be re-exported
+  --> $DIR/E0365.rs:15:9
+   |
+15 | pub use foo as foo2;
+   |         ^^^^^^^^^^^ re-export of private `foo`
+   |
+   = note: consider declaring type or module `foo` with `pub`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0370.rs b/src/test/ui/error-codes/E0370.rs
new file mode 100644 (file)
index 0000000..cafe26c
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(dead_code)]
+
+#[deny(overflowing_literals)]
+#[repr(i64)]
+enum Foo {
+    X = 0x7fffffffffffffff,
+    Y, //~ ERROR E0370
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0370.stderr b/src/test/ui/error-codes/E0370.stderr
new file mode 100644 (file)
index 0000000..1f248f4
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0370]: enum discriminant overflowed
+  --> $DIR/E0370.rs:17:5
+   |
+17 |     Y, //~ ERROR E0370
+   |     ^ overflowed on value after 9223372036854775807i64
+   |
+   = note: explicitly set `Y = -9223372036854775808i64` if that is desired outcome
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0374.rs b/src/test/ui/error-codes/E0374.rs
new file mode 100644 (file)
index 0000000..6c4782d
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(coerce_unsized)]
+use std::ops::CoerceUnsized;
+
+struct Foo<T: ?Sized> {
+    a: i32,
+}
+
+impl<T, U> CoerceUnsized<Foo<U>> for Foo<T> //~ ERROR E0374
+    where T: CoerceUnsized<U> {}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0374.stderr b/src/test/ui/error-codes/E0374.stderr
new file mode 100644 (file)
index 0000000..edd463d
--- /dev/null
@@ -0,0 +1,9 @@
+error[E0374]: the trait `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced, none found
+  --> $DIR/E0374.rs:18:1
+   |
+18 | / impl<T, U> CoerceUnsized<Foo<U>> for Foo<T> //~ ERROR E0374
+19 | |     where T: CoerceUnsized<U> {}
+   | |________________________________^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0375.rs b/src/test/ui/error-codes/E0375.rs
new file mode 100644 (file)
index 0000000..094ed35
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-tidy-linelength
+
+#![feature(coerce_unsized)]
+use std::ops::CoerceUnsized;
+
+struct Foo<T: ?Sized, U: ?Sized> {
+    a: i32,
+    b: T,
+    c: U,
+}
+
+impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
+//~^ ERROR E0375
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0375.stderr b/src/test/ui/error-codes/E0375.stderr
new file mode 100644 (file)
index 0000000..a375915
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions
+  --> $DIR/E0375.rs:22:12
+   |
+22 | impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions
+   |
+   = note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced
+   = note: currently, 2 fields need coercions: b (T to U), c (U to T)
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0376.rs b/src/test/ui/error-codes/E0376.rs
new file mode 100644 (file)
index 0000000..65be358
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(coerce_unsized)]
+use std::ops::CoerceUnsized;
+
+struct Foo<T: ?Sized> {
+    a: T,
+}
+
+impl<T, U> CoerceUnsized<U> for Foo<T> {} //~ ERROR E0376
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0376.stderr b/src/test/ui/error-codes/E0376.stderr
new file mode 100644 (file)
index 0000000..d036adb
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0376]: the trait `CoerceUnsized` may only be implemented for a coercion between structures
+  --> $DIR/E0376.rs:18:1
+   |
+18 | impl<T, U> CoerceUnsized<U> for Foo<T> {} //~ ERROR E0376
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0388.rs b/src/test/ui/error-codes/E0388.rs
new file mode 100644 (file)
index 0000000..c002bad
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+static X: i32 = 1;
+const C: i32 = 2;
+
+const CR: &'static mut i32 = &mut C; //~ ERROR E0017
+static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+                                              //~| ERROR cannot borrow
+static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr
new file mode 100644 (file)
index 0000000..ec21029
--- /dev/null
@@ -0,0 +1,26 @@
+error[E0017]: references in constants may only refer to immutable values
+  --> $DIR/E0388.rs:14:30
+   |
+14 | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
+   |                              ^^^^^^ constants require immutable values
+
+error[E0017]: references in statics may only refer to immutable values
+  --> $DIR/E0388.rs:15:39
+   |
+15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+   |                                       ^^^^^^ statics require immutable values
+
+error[E0596]: cannot borrow immutable static item as mutable
+  --> $DIR/E0388.rs:15:44
+   |
+15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+   |                                            ^
+
+error[E0017]: references in statics may only refer to immutable values
+  --> $DIR/E0388.rs:17:38
+   |
+17 | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
+   |                                      ^^^^^^ statics require immutable values
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/error-codes/E0389.rs b/src/test/ui/error-codes/E0389.rs
new file mode 100644 (file)
index 0000000..445831b
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct FancyNum {
+    num: u8,
+}
+
+fn main() {
+    let mut fancy = FancyNum{ num: 5 };
+    let fancy_ref = &(&mut fancy);
+    fancy_ref.num = 6; //~ ERROR E0389
+    println!("{}", fancy_ref.num);
+}
diff --git a/src/test/ui/error-codes/E0389.stderr b/src/test/ui/error-codes/E0389.stderr
new file mode 100644 (file)
index 0000000..e085329
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0389]: cannot assign to data in a `&` reference
+  --> $DIR/E0389.rs:18:5
+   |
+18 |     fancy_ref.num = 6; //~ ERROR E0389
+   |     ^^^^^^^^^^^^^^^^^ assignment into an immutable reference
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0390.rs b/src/test/ui/error-codes/E0390.rs
new file mode 100644 (file)
index 0000000..cd530db
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    x: i32
+}
+
+impl *mut Foo {} //~ ERROR E0390
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0390.stderr b/src/test/ui/error-codes/E0390.stderr
new file mode 100644 (file)
index 0000000..a10b0b8
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0390]: only a single inherent implementation marked with `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive
+  --> $DIR/E0390.rs:15:1
+   |
+15 | impl *mut Foo {} //~ ERROR E0390
+   | ^^^^^^^^^^^^^^^^
+   |
+help: consider using a trait to implement these methods
+  --> $DIR/E0390.rs:15:1
+   |
+15 | impl *mut Foo {} //~ ERROR E0390
+   | ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0392.rs b/src/test/ui/error-codes/E0392.rs
new file mode 100644 (file)
index 0000000..4c3efcf
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Foo<T> { Bar } //~ ERROR E0392
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr
new file mode 100644 (file)
index 0000000..6c466cb
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0392]: parameter `T` is never used
+  --> $DIR/E0392.rs:11:10
+   |
+11 | enum Foo<T> { Bar } //~ ERROR E0392
+   |          ^ unused type parameter
+   |
+   = help: consider removing `T` or using a marker such as `std::marker::PhantomData`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0393.rs b/src/test/ui/error-codes/E0393.rs
new file mode 100644 (file)
index 0000000..9165bc2
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait A<T=Self> {}
+
+fn together_we_will_rule_the_galaxy(son: &A) {}
+//~^ ERROR E0393
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0393.stderr b/src/test/ui/error-codes/E0393.stderr
new file mode 100644 (file)
index 0000000..10728e2
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0393]: the type parameter `T` must be explicitly specified
+  --> $DIR/E0393.rs:13:43
+   |
+13 | fn together_we_will_rule_the_galaxy(son: &A) {}
+   |                                           ^ missing reference to `T`
+   |
+   = note: because of the default `Self` reference, type parameters must be specified on object types
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0394.rs b/src/test/ui/error-codes/E0394.rs
new file mode 100644 (file)
index 0000000..dae8e14
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(warnings)]
+
+static A: u32 = 0;
+static B: u32 = A;
+//~^ ERROR E0394
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0394.stderr b/src/test/ui/error-codes/E0394.stderr
new file mode 100644 (file)
index 0000000..728cec1
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0394]: cannot refer to other statics by value, use the address-of operator or a constant instead
+  --> $DIR/E0394.rs:14:17
+   |
+14 | static B: u32 = A;
+   |                 ^ referring to another static by value
+   |
+   = note: use the address-of operator or a constant instead
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0395.rs b/src/test/ui/error-codes/E0395.rs
new file mode 100644 (file)
index 0000000..00008ea
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+static FOO: i32 = 42;
+static BAR: i32 = 42;
+
+static BAZ: bool = { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR E0395
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0395.stderr b/src/test/ui/error-codes/E0395.stderr
new file mode 100644 (file)
index 0000000..e6d76a6
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0395]: raw pointers cannot be compared in statics
+  --> $DIR/E0395.rs:14:22
+   |
+14 | static BAZ: bool = { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR E0395
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comparing raw pointers in static
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0396.rs b/src/test/ui/error-codes/E0396.rs
new file mode 100644 (file)
index 0000000..7f34acd
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+const REG_ADDR: *const u8 = 0x5f3759df as *const u8;
+
+const VALUE: u8 = unsafe { *REG_ADDR }; //~ ERROR E0396
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0396.stderr b/src/test/ui/error-codes/E0396.stderr
new file mode 100644 (file)
index 0000000..5c5c01c
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0396]: raw pointers cannot be dereferenced in constants
+  --> $DIR/E0396.rs:13:28
+   |
+13 | const VALUE: u8 = unsafe { *REG_ADDR }; //~ ERROR E0396
+   |                            ^^^^^^^^^ dereference of raw pointer in constant
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0401.rs b/src/test/ui/error-codes/E0401.rs
new file mode 100644 (file)
index 0000000..09bc950
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo<T>(x: T) {
+    fn bar(y: T) { //~ ERROR E0401
+    }
+    bar(x);
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0401.stderr b/src/test/ui/error-codes/E0401.stderr
new file mode 100644 (file)
index 0000000..d63aa37
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0401]: can't use type parameters from outer function; try using a local type parameter instead
+  --> $DIR/E0401.rs:12:15
+   |
+12 |     fn bar(y: T) { //~ ERROR E0401
+   |               ^ use of type variable from outer function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0403.rs b/src/test/ui/error-codes/E0403.rs
new file mode 100644 (file)
index 0000000..6a68013
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo<T, T>(s: T, u: T) {} //~ ERROR E0403
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0403.stderr b/src/test/ui/error-codes/E0403.stderr
new file mode 100644 (file)
index 0000000..125af35
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0403]: the name `T` is already used for a type parameter in this type parameter list
+  --> $DIR/E0403.rs:11:11
+   |
+11 | fn foo<T, T>(s: T, u: T) {} //~ ERROR E0403
+   |        -  ^ already used
+   |        |
+   |        first use of `T`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0404.rs b/src/test/ui/error-codes/E0404.rs
new file mode 100644 (file)
index 0000000..1c088a7
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo;
+struct Bar;
+
+impl Foo for Bar {} //~ ERROR E0404
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0404.stderr b/src/test/ui/error-codes/E0404.stderr
new file mode 100644 (file)
index 0000000..c30d8c0
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0404]: expected trait, found struct `Foo`
+  --> $DIR/E0404.rs:14:6
+   |
+14 | impl Foo for Bar {} //~ ERROR E0404
+   |      ^^^ not a trait
+
+error: cannot continue compilation due to previous error
+
diff --git a/src/test/ui/error-codes/E0405.rs b/src/test/ui/error-codes/E0405.rs
new file mode 100644 (file)
index 0000000..45d4b21
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo;
+
+impl SomeTrait for Foo {} //~ ERROR E0405
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0405.stderr b/src/test/ui/error-codes/E0405.stderr
new file mode 100644 (file)
index 0000000..29bab3f
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0405]: cannot find trait `SomeTrait` in this scope
+  --> $DIR/E0405.rs:13:6
+   |
+13 | impl SomeTrait for Foo {} //~ ERROR E0405
+   |      ^^^^^^^^^ not found in this scope
+
+error: cannot continue compilation due to previous error
+
diff --git a/src/test/ui/error-codes/E0407.rs b/src/test/ui/error-codes/E0407.rs
new file mode 100644 (file)
index 0000000..41d8b45
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn a();
+}
+
+struct Bar;
+
+impl Foo for Bar {
+    fn a() {}
+    fn b() {}
+    //~^ ERROR E0407
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0407.stderr b/src/test/ui/error-codes/E0407.stderr
new file mode 100644 (file)
index 0000000..f71437c
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0407]: method `b` is not a member of trait `Foo`
+  --> $DIR/E0407.rs:19:5
+   |
+19 |     fn b() {}
+   |     ^^^^^^^^^ not a member of trait `Foo`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0408.rs b/src/test/ui/error-codes/E0408.rs
new file mode 100644 (file)
index 0000000..8ddeb20
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = Some(0);
+
+    match x {
+        Some(y) | None => {} //~  ERROR variable `y` is not bound in all patterns
+        _ => ()
+    }
+}
diff --git a/src/test/ui/error-codes/E0408.stderr b/src/test/ui/error-codes/E0408.stderr
new file mode 100644 (file)
index 0000000..1c66bb0
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0408]: variable `y` is not bound in all patterns
+  --> $DIR/E0408.rs:15:19
+   |
+15 |         Some(y) | None => {} //~  ERROR variable `y` is not bound in all patterns
+   |              -    ^^^^ pattern doesn't bind `y`
+   |              |
+   |              variable not in all patterns
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0411.rs b/src/test/ui/error-codes/E0411.rs
new file mode 100644 (file)
index 0000000..187986f
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    <Self>::foo; //~ ERROR E0411
+}
diff --git a/src/test/ui/error-codes/E0411.stderr b/src/test/ui/error-codes/E0411.stderr
new file mode 100644 (file)
index 0000000..dda922b
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0411]: cannot find type `Self` in this scope
+  --> $DIR/E0411.rs:12:6
+   |
+12 |     <Self>::foo; //~ ERROR E0411
+   |      ^^^^ `Self` is only available in traits and impls
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0412.rs b/src/test/ui/error-codes/E0412.rs
new file mode 100644 (file)
index 0000000..f62901c
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+impl Something {} //~ ERROR E0412
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0412.stderr b/src/test/ui/error-codes/E0412.stderr
new file mode 100644 (file)
index 0000000..6ee2125
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0412]: cannot find type `Something` in this scope
+  --> $DIR/E0412.rs:11:6
+   |
+11 | impl Something {} //~ ERROR E0412
+   |      ^^^^^^^^^ not found in this scope
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0415.rs b/src/test/ui/error-codes/E0415.rs
new file mode 100644 (file)
index 0000000..2a5f0d3
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo(f: i32, f: i32) {} //~ ERROR E0415
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0415.stderr b/src/test/ui/error-codes/E0415.stderr
new file mode 100644 (file)
index 0000000..5e5cfe1
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0415]: identifier `f` is bound more than once in this parameter list
+  --> $DIR/E0415.rs:11:16
+   |
+11 | fn foo(f: i32, f: i32) {} //~ ERROR E0415
+   |                ^ used as parameter more than once
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0416.rs b/src/test/ui/error-codes/E0416.rs
new file mode 100644 (file)
index 0000000..91077ab
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    match (1, 2) {
+        (x, x) => {} //~ ERROR E0416
+    }
+}
diff --git a/src/test/ui/error-codes/E0416.stderr b/src/test/ui/error-codes/E0416.stderr
new file mode 100644 (file)
index 0000000..a48a3ad
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0416]: identifier `x` is bound more than once in the same pattern
+  --> $DIR/E0416.rs:13:13
+   |
+13 |         (x, x) => {} //~ ERROR E0416
+   |             ^ used in a pattern more than once
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0423.rs b/src/test/ui/error-codes/E0423.rs
new file mode 100644 (file)
index 0000000..f5fea77
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main () {
+    struct Foo { a: bool };
+
+    let f = Foo(); //~ ERROR E0423
+}
diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr
new file mode 100644 (file)
index 0000000..aee398e
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0423]: expected function, found struct `Foo`
+  --> $DIR/E0423.rs:14:13
+   |
+14 |     let f = Foo(); //~ ERROR E0423
+   |             ^^^ did you mean `Foo { /* fields */ }`?
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0424.rs b/src/test/ui/error-codes/E0424.rs
new file mode 100644 (file)
index 0000000..445d0c5
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo;
+
+impl Foo {
+    fn bar(self) {}
+
+    fn foo() {
+        self.bar(); //~ ERROR E0424
+    }
+}
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0424.stderr b/src/test/ui/error-codes/E0424.stderr
new file mode 100644 (file)
index 0000000..d1fd432
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0424]: expected value, found module `self`
+  --> $DIR/E0424.rs:17:9
+   |
+17 |         self.bar(); //~ ERROR E0424
+   |         ^^^^ `self` value is only available in methods with `self` parameter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0425.rs b/src/test/ui/error-codes/E0425.rs
new file mode 100644 (file)
index 0000000..3786282
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn bar() {
+        elf; //~ ERROR E0425
+    }
+}
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0425.stderr b/src/test/ui/error-codes/E0425.stderr
new file mode 100644 (file)
index 0000000..250ecae
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0425]: cannot find value `elf` in this scope
+  --> $DIR/E0425.rs:13:9
+   |
+13 |         elf; //~ ERROR E0425
+   |         ^^^ not found in this scope
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0426.rs b/src/test/ui/error-codes/E0426.rs
new file mode 100644 (file)
index 0000000..d6261d3
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main () {
+    loop {
+        break 'a;
+        //~^ ERROR E0426
+    }
+}
diff --git a/src/test/ui/error-codes/E0426.stderr b/src/test/ui/error-codes/E0426.stderr
new file mode 100644 (file)
index 0000000..bb05eff
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0426]: use of undeclared label `'a`
+  --> $DIR/E0426.rs:13:15
+   |
+13 |         break 'a;
+   |               ^^ undeclared label `'a`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0428.rs b/src/test/ui/error-codes/E0428.rs
new file mode 100644 (file)
index 0000000..3c709f3
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Bar; //~ previous definition of the type `Bar` here
+struct Bar; //~ ERROR E0428
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0428.stderr b/src/test/ui/error-codes/E0428.stderr
new file mode 100644 (file)
index 0000000..c739536
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0428]: the name `Bar` is defined multiple times
+  --> $DIR/E0428.rs:12:1
+   |
+11 | struct Bar; //~ previous definition of the type `Bar` here
+   | ----------- previous definition of the type `Bar` here
+12 | struct Bar; //~ ERROR E0428
+   | ^^^^^^^^^^^ `Bar` redefined here
+   |
+   = note: `Bar` must be defined only once in the type namespace of this module
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0429.rs b/src/test/ui/error-codes/E0429.rs
new file mode 100644 (file)
index 0000000..f1cad20
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::fmt::self; //~ ERROR E0429
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0429.stderr b/src/test/ui/error-codes/E0429.stderr
new file mode 100644 (file)
index 0000000..96cf505
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0429]: `self` imports are only allowed within a { } list
+  --> $DIR/E0429.rs:11:5
+   |
+11 | use std::fmt::self; //~ ERROR E0429
+   |     ^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0430.rs b/src/test/ui/error-codes/E0430.rs
new file mode 100644 (file)
index 0000000..992876d
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::fmt::{self, self}; //~ ERROR E0430
+                            //~^ ERROR E0252
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0430.stderr b/src/test/ui/error-codes/E0430.stderr
new file mode 100644 (file)
index 0000000..b5c80aa
--- /dev/null
@@ -0,0 +1,24 @@
+error[E0430]: `self` import can only appear once in an import list
+  --> $DIR/E0430.rs:11:16
+   |
+11 | use std::fmt::{self, self}; //~ ERROR E0430
+   |                ^^^^  ---- another `self` import appears here
+   |                |
+   |                can only appear once in an import list
+
+error[E0252]: the name `fmt` is defined multiple times
+  --> $DIR/E0430.rs:11:22
+   |
+11 | use std::fmt::{self, self}; //~ ERROR E0430
+   |                ----  ^^^^ `fmt` reimported here
+   |                |
+   |                previous import of the module `fmt` here
+   |
+   = note: `fmt` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+11 | use std::fmt::{self, self as other_fmt}; //~ ERROR E0430
+   |                      ^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0431.rs b/src/test/ui/error-codes/E0431.rs
new file mode 100644 (file)
index 0000000..09ddc1e
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use {self}; //~ ERROR E0431
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0431.stderr b/src/test/ui/error-codes/E0431.stderr
new file mode 100644 (file)
index 0000000..c7a786b
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0431]: `self` import can only appear in an import list with a non-empty prefix
+  --> $DIR/E0431.rs:11:6
+   |
+11 | use {self}; //~ ERROR E0431
+   |      ^^^^ can only appear in an import list with a non-empty prefix
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0432.rs b/src/test/ui/error-codes/E0432.rs
new file mode 100644 (file)
index 0000000..08d699e
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use something::Foo; //~ ERROR E0432
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0432.stderr b/src/test/ui/error-codes/E0432.stderr
new file mode 100644 (file)
index 0000000..6d808f0
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0432]: unresolved import `something`
+  --> $DIR/E0432.rs:11:5
+   |
+11 | use something::Foo; //~ ERROR E0432
+   |     ^^^^^^^^^ Maybe a missing `extern crate something;`?
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0433.rs b/src/test/ui/error-codes/E0433.rs
new file mode 100644 (file)
index 0000000..916d622
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main () {
+    let map = HashMap::new(); //~ ERROR E0433
+}
diff --git a/src/test/ui/error-codes/E0433.stderr b/src/test/ui/error-codes/E0433.stderr
new file mode 100644 (file)
index 0000000..691c592
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0433]: failed to resolve. Use of undeclared type or module `HashMap`
+  --> $DIR/E0433.rs:12:15
+   |
+12 |     let map = HashMap::new(); //~ ERROR E0433
+   |               ^^^^^^^ Use of undeclared type or module `HashMap`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0434.rs b/src/test/ui/error-codes/E0434.rs
new file mode 100644 (file)
index 0000000..747d9f7
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo() {
+    let y = 5;
+    fn bar() -> u32 {
+        y //~ ERROR E0434
+    }
+}
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0434.stderr b/src/test/ui/error-codes/E0434.stderr
new file mode 100644 (file)
index 0000000..06880ac
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/E0434.rs:14:9
+   |
+14 |         y //~ ERROR E0434
+   |         ^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0435.rs b/src/test/ui/error-codes/E0435.rs
new file mode 100644 (file)
index 0000000..5246fda
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main () {
+    let foo = 42u32;
+    let _: [u8; foo]; //~ ERROR E0435
+}
diff --git a/src/test/ui/error-codes/E0435.stderr b/src/test/ui/error-codes/E0435.stderr
new file mode 100644 (file)
index 0000000..855903b
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0435]: attempt to use a non-constant value in a constant
+  --> $DIR/E0435.rs:13:17
+   |
+13 |     let _: [u8; foo]; //~ ERROR E0435
+   |                 ^^^ non-constant value
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0437.rs b/src/test/ui/error-codes/E0437.rs
new file mode 100644 (file)
index 0000000..7440a82
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {}
+
+impl Foo for i32 {
+    type Bar = bool; //~ ERROR E0437
+}
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0437.stderr b/src/test/ui/error-codes/E0437.stderr
new file mode 100644 (file)
index 0000000..ffad571
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0437]: type `Bar` is not a member of trait `Foo`
+  --> $DIR/E0437.rs:14:5
+   |
+14 |     type Bar = bool; //~ ERROR E0437
+   |     ^^^^^^^^^^^^^^^^ not a member of trait `Foo`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0438.rs b/src/test/ui/error-codes/E0438.rs
new file mode 100644 (file)
index 0000000..61d2513
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+trait Bar {}
+
+impl Bar for i32 {
+    const BAR: bool = true; //~ ERROR E0438
+}
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0438.stderr b/src/test/ui/error-codes/E0438.stderr
new file mode 100644 (file)
index 0000000..df58739
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0438]: const `BAR` is not a member of trait `Bar`
+  --> $DIR/E0438.rs:15:5
+   |
+15 |     const BAR: bool = true; //~ ERROR E0438
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Bar`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0439.rs b/src/test/ui/error-codes/E0439.rs
new file mode 100644 (file)
index 0000000..5244343
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(platform_intrinsics)]
+
+extern "platform-intrinsic" {
+    fn simd_shuffle<A,B>(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439
+}
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0439.stderr b/src/test/ui/error-codes/E0439.stderr
new file mode 100644 (file)
index 0000000..77930d5
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0439]: invalid `simd_shuffle`, needs length: `simd_shuffle`
+  --> $DIR/E0439.rs:14:5
+   |
+14 |     fn simd_shuffle<A,B>(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0440.rs b/src/test/ui/error-codes/E0440.rs
new file mode 100644 (file)
index 0000000..04e7584
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+#![feature(platform_intrinsics)]
+
+#[repr(simd)]
+struct f64x2(f64, f64);
+
+extern "platform-intrinsic" {
+    fn x86_mm_movemask_pd<T>(x: f64x2) -> i32; //~ ERROR E0440
+}
+
+fn main () {
+}
diff --git a/src/test/ui/error-codes/E0440.stderr b/src/test/ui/error-codes/E0440.stderr
new file mode 100644 (file)
index 0000000..83210a9
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0440]: platform-specific intrinsic has wrong number of type parameters: found 1, expected 0
+  --> $DIR/E0440.rs:18:5
+   |
+18 |     fn x86_mm_movemask_pd<T>(x: f64x2) -> i32; //~ ERROR E0440
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0441.rs b/src/test/ui/error-codes/E0441.rs
new file mode 100644 (file)
index 0000000..967ff64
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+#![feature(platform_intrinsics)]
+
+#[repr(simd)]
+struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
+
+extern "platform-intrinsic" {
+    fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0441.stderr b/src/test/ui/error-codes/E0441.stderr
new file mode 100644 (file)
index 0000000..34a387e
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0441]: unrecognized platform-specific intrinsic function: `x86_mm_adds_ep16`
+  --> $DIR/E0441.rs:18:5
+   |
+18 |     fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0442.rs b/src/test/ui/error-codes/E0442.rs
new file mode 100644 (file)
index 0000000..ddd9270
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+#![feature(platform_intrinsics)]
+
+#[repr(simd)]
+struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
+             i8, i8, i8, i8, i8, i8, i8, i8);
+#[repr(simd)]
+struct i32x4(i32, i32, i32, i32);
+#[repr(simd)]
+struct i64x2(i64, i64);
+
+extern "platform-intrinsic" {
+    fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
+    //~^ ERROR E0442
+    //~| ERROR E0442
+    //~| ERROR E0442
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0442.stderr b/src/test/ui/error-codes/E0442.stderr
new file mode 100644 (file)
index 0000000..6f19fd1
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0442]: intrinsic argument 1 has wrong type: found vector with length 16, expected length 8
+  --> $DIR/E0442.rs:23:5
+   |
+23 |     fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0442]: intrinsic argument 2 has wrong type: found vector with length 4, expected length 8
+  --> $DIR/E0442.rs:23:5
+   |
+23 |     fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0442]: intrinsic return value has wrong type: found vector with length 2, expected length 8
+  --> $DIR/E0442.rs:23:5
+   |
+23 |     fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0443.rs b/src/test/ui/error-codes/E0443.rs
new file mode 100644 (file)
index 0000000..24d1ee0
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+#![feature(platform_intrinsics)]
+
+#[repr(simd)]
+struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
+#[repr(simd)]
+struct i64x8(i64, i64, i64, i64, i64, i64, i64, i64);
+
+extern "platform-intrinsic" {
+    fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0443.stderr b/src/test/ui/error-codes/E0443.stderr
new file mode 100644 (file)
index 0000000..ebf8ef5
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0443]: intrinsic return value has wrong type: found `i64x8`, expected `i16x8` which was used for this vector type previously in this signature
+  --> $DIR/E0443.rs:20:5
+   |
+20 |     fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0444.rs b/src/test/ui/error-codes/E0444.rs
new file mode 100644 (file)
index 0000000..a424a3c
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(repr_simd)]
+#![feature(platform_intrinsics)]
+
+#[repr(simd)]
+struct f64x2(f64, f64);
+
+extern "platform-intrinsic" {
+    fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0444.stderr b/src/test/ui/error-codes/E0444.stderr
new file mode 100644 (file)
index 0000000..e44d945
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0444]: platform-specific intrinsic has invalid number of arguments: found 3, expected 1
+  --> $DIR/E0444.rs:18:5
+   |
+18 |     fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0445.rs b/src/test/ui/error-codes/E0445.rs
new file mode 100644 (file)
index 0000000..bca1b52
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    fn dummy(&self) { }
+}
+
+pub trait Bar : Foo {}
+//~^ ERROR private trait `Foo` in public interface [E0445]
+//~| NOTE can't leak private trait
+pub struct Bar2<T: Foo>(pub T);
+//~^ ERROR private trait `Foo` in public interface [E0445]
+//~| NOTE can't leak private trait
+pub fn foo<T: Foo> (t: T) {}
+//~^ ERROR private trait `Foo` in public interface [E0445]
+//~| NOTE can't leak private trait
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0445.stderr b/src/test/ui/error-codes/E0445.stderr
new file mode 100644 (file)
index 0000000..7b59954
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0445]: private trait `Foo` in public interface
+  --> $DIR/E0445.rs:15:1
+   |
+15 | pub trait Bar : Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+
+error[E0445]: private trait `Foo` in public interface
+  --> $DIR/E0445.rs:18:1
+   |
+18 | pub struct Bar2<T: Foo>(pub T);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+
+error[E0445]: private trait `Foo` in public interface
+  --> $DIR/E0445.rs:21:1
+   |
+21 | pub fn foo<T: Foo> (t: T) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0446.rs b/src/test/ui/error-codes/E0446.rs
new file mode 100644 (file)
index 0000000..c576661
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod Foo {
+    struct Bar(u32);
+
+    pub fn bar() -> Bar { //~ ERROR E0446
+        Bar(0)
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0446.stderr b/src/test/ui/error-codes/E0446.stderr
new file mode 100644 (file)
index 0000000..1b61ca9
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0446]: private type `Foo::Bar` in public interface
+  --> $DIR/E0446.rs:14:5
+   |
+14 | /     pub fn bar() -> Bar { //~ ERROR E0446
+15 | |         Bar(0)
+16 | |     }
+   | |_____^ can't leak private type
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0449.rs b/src/test/ui/error-codes/E0449.rs
new file mode 100644 (file)
index 0000000..ac365db
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Bar;
+
+trait Foo {
+    fn foo();
+}
+
+pub impl Bar {} //~ ERROR E0449
+
+pub impl Foo for Bar { //~ ERROR E0449
+    pub fn foo() {} //~ ERROR E0449
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0449.stderr b/src/test/ui/error-codes/E0449.stderr
new file mode 100644 (file)
index 0000000..2270167
--- /dev/null
@@ -0,0 +1,24 @@
+error[E0449]: unnecessary visibility qualifier
+  --> $DIR/E0449.rs:17:1
+   |
+17 | pub impl Bar {} //~ ERROR E0449
+   | ^^^^^^^^^^^^^^^ `pub` not needed here
+   |
+   = note: place qualifiers on individual impl items instead
+
+error[E0449]: unnecessary visibility qualifier
+  --> $DIR/E0449.rs:19:1
+   |
+19 | / pub impl Foo for Bar { //~ ERROR E0449
+20 | |     pub fn foo() {} //~ ERROR E0449
+21 | | }
+   | |_^ `pub` not needed here
+
+error[E0449]: unnecessary visibility qualifier
+  --> $DIR/E0449.rs:20:5
+   |
+20 |     pub fn foo() {} //~ ERROR E0449
+   |     ^^^^^^^^^^^^^^^ `pub` not needed here
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0451.rs b/src/test/ui/error-codes/E0451.rs
new file mode 100644 (file)
index 0000000..af4e7d6
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod Bar {
+    pub struct Foo {
+        pub a: isize,
+        b: isize,
+    }
+
+    pub struct FooTuple (
+        pub isize,
+        isize,
+    );
+}
+
+fn pat_match(foo: Bar::Foo) {
+    let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451
+}
+
+fn main() {
+    let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
+}
diff --git a/src/test/ui/error-codes/E0451.stderr b/src/test/ui/error-codes/E0451.stderr
new file mode 100644 (file)
index 0000000..0c29bee
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0451]: field `b` of struct `Bar::Foo` is private
+  --> $DIR/E0451.rs:24:23
+   |
+24 |     let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451
+   |                       ^^^ field `b` is private
+
+error[E0451]: field `b` of struct `Bar::Foo` is private
+  --> $DIR/E0451.rs:28:29
+   |
+28 |     let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
+   |                             ^^^^ field `b` is private
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0452.rs b/src/test/ui/error-codes/E0452.rs
new file mode 100644 (file)
index 0000000..1665bbd
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(foo = "")] //~ ERROR E0452
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0452.stderr b/src/test/ui/error-codes/E0452.stderr
new file mode 100644 (file)
index 0000000..d63d0ed
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0452]: malformed lint attribute
+  --> $DIR/E0452.rs:11:10
+   |
+11 | #![allow(foo = "")] //~ ERROR E0452
+   |          ^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0453.rs b/src/test/ui/error-codes/E0453.rs
new file mode 100644 (file)
index 0000000..8e51b84
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![forbid(non_snake_case)]
+
+#[allow(non_snake_case)]
+//~^ ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0453.stderr b/src/test/ui/error-codes/E0453.stderr
new file mode 100644 (file)
index 0000000..467784f
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0453]: allow(non_snake_case) overruled by outer forbid(non_snake_case)
+  --> $DIR/E0453.rs:13:9
+   |
+11 | #![forbid(non_snake_case)]
+   |           -------------- `forbid` level set here
+12 | 
+13 | #[allow(non_snake_case)]
+   |         ^^^^^^^^^^^^^^ overruled by previous forbid
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0454.rs b/src/test/ui/error-codes/E0454.rs
new file mode 100644 (file)
index 0000000..afd0f5f
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[link(name = "")] extern {}
+//~^ ERROR E0454
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0454.stderr b/src/test/ui/error-codes/E0454.stderr
new file mode 100644 (file)
index 0000000..aee8b53
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0454]: #[link(name = "")] given with empty name
+  --> $DIR/E0454.rs:11:1
+   |
+11 | #[link(name = "")] extern {}
+   | ^^^^^^^^^^^^^^^^^^ empty name given
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0458.rs b/src/test/ui/error-codes/E0458.rs
new file mode 100644 (file)
index 0000000..fea27ef
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458
+                                              //~| ERROR E0459
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0458.stderr b/src/test/ui/error-codes/E0458.stderr
new file mode 100644 (file)
index 0000000..9cdd0d5
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0458]: unknown kind: `wonderful_unicorn`
+  --> $DIR/E0458.rs:11:1
+   |
+11 | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown kind
+
+error[E0459]: #[link(...)] specified without `name = "foo"`
+  --> $DIR/E0458.rs:11:1
+   |
+11 | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0459.rs b/src/test/ui/error-codes/E0459.rs
new file mode 100644 (file)
index 0000000..dc7ac71
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[link(kind = "dylib")] extern {} //~ ERROR E0459
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0459.stderr b/src/test/ui/error-codes/E0459.stderr
new file mode 100644 (file)
index 0000000..512788e
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0459]: #[link(...)] specified without `name = "foo"`
+  --> $DIR/E0459.rs:11:1
+   |
+11 | #[link(kind = "dylib")] extern {} //~ ERROR E0459
+   | ^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0463.rs b/src/test/ui/error-codes/E0463.rs
new file mode 100644 (file)
index 0000000..aae8397
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(plugin)]
+#![plugin(cookie_monster)]
+//~^ ERROR E0463
+extern crate cake_is_a_lie;
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0463.stderr b/src/test/ui/error-codes/E0463.stderr
new file mode 100644 (file)
index 0000000..208c00c
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0463]: can't find crate for `cookie_monster`
+  --> $DIR/E0463.rs:12:11
+   |
+12 | #![plugin(cookie_monster)]
+   |           ^^^^^^^^^^^^^^ can't find crate
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0478.rs b/src/test/ui/error-codes/E0478.rs
new file mode 100644 (file)
index 0000000..8eb4003
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Wedding<'t>: 't { }
+
+struct Prince<'kiss, 'SnowWhite> {
+    child: Box<Wedding<'kiss> + 'SnowWhite>, //~ ERROR E0478
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr
new file mode 100644 (file)
index 0000000..f909fa4
--- /dev/null
@@ -0,0 +1,19 @@
+error[E0478]: lifetime bound not satisfied
+  --> $DIR/E0478.rs:14:5
+   |
+14 |     child: Box<Wedding<'kiss> + 'SnowWhite>, //~ ERROR E0478
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: lifetime parameter instantiated with the lifetime 'SnowWhite as defined on the struct at 13:1
+  --> $DIR/E0478.rs:13:1
+   |
+13 | struct Prince<'kiss, 'SnowWhite> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: but lifetime parameter must outlive the lifetime 'kiss as defined on the struct at 13:1
+  --> $DIR/E0478.rs:13:1
+   |
+13 | struct Prince<'kiss, 'SnowWhite> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0492.rs b/src/test/ui/error-codes/E0492.rs
new file mode 100644 (file)
index 0000000..8e4964c
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT};
+
+const A: AtomicUsize = ATOMIC_USIZE_INIT;
+static B: &'static AtomicUsize = &A; //~ ERROR E0492
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0492.stderr b/src/test/ui/error-codes/E0492.stderr
new file mode 100644 (file)
index 0000000..c198966
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
+  --> $DIR/E0492.rs:14:34
+   |
+14 | static B: &'static AtomicUsize = &A; //~ ERROR E0492
+   |                                  ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0494.rs b/src/test/ui/error-codes/E0494.rs
new file mode 100644 (file)
index 0000000..5f8632a
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    a: u32
+}
+
+static S : Foo = Foo { a : 0 };
+static A : &'static u32 = &S.a; //~ ERROR E0494
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0494.stderr b/src/test/ui/error-codes/E0494.stderr
new file mode 100644 (file)
index 0000000..1d5ded5
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0494]: cannot refer to the interior of another static, use a constant instead
+  --> $DIR/E0494.rs:16:27
+   |
+16 | static A : &'static u32 = &S.a; //~ ERROR E0494
+   |                           ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0496.rs b/src/test/ui/error-codes/E0496.rs
new file mode 100644 (file)
index 0000000..4ca3cd9
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo<'a> {
+    a: &'a i32,
+}
+
+impl<'a> Foo<'a> {
+    fn f<'a>(x: &'a i32) { //~ ERROR E0496
+    }
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0496.stderr b/src/test/ui/error-codes/E0496.stderr
new file mode 100644 (file)
index 0000000..ab9a08a
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope
+  --> $DIR/E0496.rs:16:10
+   |
+15 | impl<'a> Foo<'a> {
+   |      -- first declared here
+16 |     fn f<'a>(x: &'a i32) { //~ ERROR E0496
+   |          ^^ lifetime 'a already in scope
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0499.rs b/src/test/ui/error-codes/E0499.rs
new file mode 100644 (file)
index 0000000..9a64bfe
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let mut i = 0;
+    let mut x = &mut i;
+    let mut a = &mut i; //~ ERROR E0499
+}
diff --git a/src/test/ui/error-codes/E0499.stderr b/src/test/ui/error-codes/E0499.stderr
new file mode 100644 (file)
index 0000000..c3057d9
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0499]: cannot borrow `i` as mutable more than once at a time
+  --> $DIR/E0499.rs:14:22
+   |
+13 |     let mut x = &mut i;
+   |                      - first mutable borrow occurs here
+14 |     let mut a = &mut i; //~ ERROR E0499
+   |                      ^ second mutable borrow occurs here
+15 | }
+   | - first borrow ends here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0502.rs b/src/test/ui/error-codes/E0502.rs
new file mode 100644 (file)
index 0000000..fce8513
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn bar(x: &mut i32) {}
+fn foo(a: &mut i32) {
+    let ref y = a;
+    bar(a); //~ ERROR E0502
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0502.stderr b/src/test/ui/error-codes/E0502.stderr
new file mode 100644 (file)
index 0000000..e578cff
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0502]: cannot borrow `*a` as mutable because `a` is also borrowed as immutable
+  --> $DIR/E0502.rs:14:9
+   |
+13 |     let ref y = a;
+   |         ----- immutable borrow occurs here
+14 |     bar(a); //~ ERROR E0502
+   |         ^ mutable borrow occurs here
+15 | }
+   | - immutable borrow ends here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0503.rs b/src/test/ui/error-codes/E0503.rs
new file mode 100644 (file)
index 0000000..810eb8d
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let mut value = 3;
+    let _borrow = &mut value;
+    let _sum = value + 1; //~ ERROR E0503
+}
diff --git a/src/test/ui/error-codes/E0503.stderr b/src/test/ui/error-codes/E0503.stderr
new file mode 100644 (file)
index 0000000..112e2c4
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0503]: cannot use `value` because it was mutably borrowed
+  --> $DIR/E0503.rs:14:16
+   |
+13 |     let _borrow = &mut value;
+   |                        ----- borrow of `value` occurs here
+14 |     let _sum = value + 1; //~ ERROR E0503
+   |                ^^^^^ use of borrowed `value`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0504.rs b/src/test/ui/error-codes/E0504.rs
new file mode 100644 (file)
index 0000000..c594f24
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct FancyNum {
+    num: u8,
+}
+
+fn main() {
+    let fancy_num = FancyNum { num: 5 };
+    let fancy_ref = &fancy_num;
+
+    let x = move || {
+        println!("child function: {}", fancy_num.num); //~ ERROR E0504
+    };
+
+    x();
+    println!("main function: {}", fancy_ref.num);
+}
diff --git a/src/test/ui/error-codes/E0504.stderr b/src/test/ui/error-codes/E0504.stderr
new file mode 100644 (file)
index 0000000..0f1b183
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0504]: cannot move `fancy_num` into closure because it is borrowed
+  --> $DIR/E0504.rs:20:40
+   |
+17 |     let fancy_ref = &fancy_num;
+   |                      --------- borrow of `fancy_num` occurs here
+...
+20 |         println!("child function: {}", fancy_num.num); //~ ERROR E0504
+   |                                        ^^^^^^^^^ move into closure occurs here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0505.rs b/src/test/ui/error-codes/E0505.rs
new file mode 100644 (file)
index 0000000..2d534b8
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Value {}
+
+fn eat(val: Value) {}
+
+fn main() {
+    let x = Value{};
+    {
+        let _ref_to_val: &Value = &x;
+        eat(x); //~ ERROR E0505
+    }
+}
diff --git a/src/test/ui/error-codes/E0505.stderr b/src/test/ui/error-codes/E0505.stderr
new file mode 100644 (file)
index 0000000..dfb327d
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0505]: cannot move out of `x` because it is borrowed
+  --> $DIR/E0505.rs:19:13
+   |
+18 |         let _ref_to_val: &Value = &x;
+   |                                    - borrow of `x` occurs here
+19 |         eat(x); //~ ERROR E0505
+   |             ^ move out of `x` occurs here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0507.rs b/src/test/ui/error-codes/E0507.rs
new file mode 100644 (file)
index 0000000..87b1bf5
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::cell::RefCell;
+
+struct TheDarkKnight;
+
+impl TheDarkKnight {
+    fn nothing_is_true(self) {}
+}
+
+fn main() {
+    let x = RefCell::new(TheDarkKnight);
+
+    x.borrow().nothing_is_true(); //~ ERROR E0507
+}
diff --git a/src/test/ui/error-codes/E0507.stderr b/src/test/ui/error-codes/E0507.stderr
new file mode 100644 (file)
index 0000000..407ebb8
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/E0507.rs:22:5
+   |
+22 |     x.borrow().nothing_is_true(); //~ ERROR E0507
+   |     ^^^^^^^^^^ cannot move out of borrowed content
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0509.rs b/src/test/ui/error-codes/E0509.rs
new file mode 100644 (file)
index 0000000..b92024c
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct FancyNum {
+    num: usize
+}
+
+struct DropStruct {
+    fancy: FancyNum
+}
+
+impl Drop for DropStruct {
+    fn drop(&mut self) {
+    }
+}
+
+fn main() {
+    let drop_struct = DropStruct{fancy: FancyNum{num: 5}};
+    let fancy_field = drop_struct.fancy; //~ ERROR E0509
+    println!("Fancy: {}", fancy_field.num);
+}
diff --git a/src/test/ui/error-codes/E0509.stderr b/src/test/ui/error-codes/E0509.stderr
new file mode 100644 (file)
index 0000000..6da0fdb
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait
+  --> $DIR/E0509.rs:26:23
+   |
+26 |     let fancy_field = drop_struct.fancy; //~ ERROR E0509
+   |                       ^^^^^^^^^^^^^^^^^
+   |                       |
+   |                       cannot move out of here
+   |                       help: consider using a reference instead: `&drop_struct.fancy`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0511.rs b/src/test/ui/error-codes/E0511.rs
new file mode 100644 (file)
index 0000000..c5c03f8
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(platform_intrinsics)]
+
+extern "platform-intrinsic" {
+    fn simd_add<T>(a: T, b: T) -> T;
+}
+
+fn main() {
+    unsafe { simd_add(0, 1); } //~ ERROR E0511
+}
diff --git a/src/test/ui/error-codes/E0511.stderr b/src/test/ui/error-codes/E0511.stderr
new file mode 100644 (file)
index 0000000..b714350
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32`
+  --> $DIR/E0511.rs:18:14
+   |
+18 |     unsafe { simd_add(0, 1); } //~ ERROR E0511
+   |              ^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0512.rs b/src/test/ui/error-codes/E0512.rs
new file mode 100644 (file)
index 0000000..25f9627
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn takes_u8(_: u8) {}
+
+fn main() {
+    unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512
+}
diff --git a/src/test/ui/error-codes/E0512.stderr b/src/test/ui/error-codes/E0512.stderr
new file mode 100644 (file)
index 0000000..ad25bb2
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0512]: transmute called with types of different sizes
+  --> $DIR/E0512.rs:14:23
+   |
+14 |     unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512
+   |                       ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: source type: u16 (16 bits)
+   = note: target type: u8 (8 bits)
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0516.rs b/src/test/ui/error-codes/E0516.rs
new file mode 100644 (file)
index 0000000..be2b89c
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x: typeof(92) = 92; //~ ERROR E0516
+                            //~| reserved keyword
+}
diff --git a/src/test/ui/error-codes/E0516.stderr b/src/test/ui/error-codes/E0516.stderr
new file mode 100644 (file)
index 0000000..6209296
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0516]: `typeof` is a reserved keyword but unimplemented
+  --> $DIR/E0516.rs:12:12
+   |
+12 |     let x: typeof(92) = 92; //~ ERROR E0516
+   |            ^^^^^^^^^^ reserved keyword
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0517.rs b/src/test/ui/error-codes/E0517.rs
new file mode 100644 (file)
index 0000000..561223c
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[repr(C)] //~ ERROR: E0517
+type Foo = u8;
+
+#[repr(packed)] //~ ERROR: E0517
+enum Foo2 {Bar, Baz}
+
+#[repr(u8)] //~ ERROR: E0517
+struct Foo3 {bar: bool, baz: bool}
+
+#[repr(C)] //~ ERROR: E0517
+impl Foo3 {
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0517.stderr b/src/test/ui/error-codes/E0517.stderr
new file mode 100644 (file)
index 0000000..968c47f
--- /dev/null
@@ -0,0 +1,35 @@
+error[E0517]: attribute should be applied to struct, enum or union
+  --> $DIR/E0517.rs:11:8
+   |
+11 | #[repr(C)] //~ ERROR: E0517
+   |        ^
+12 | type Foo = u8;
+   | -------------- not a struct, enum or union
+
+error[E0517]: attribute should be applied to struct or union
+  --> $DIR/E0517.rs:14:8
+   |
+14 | #[repr(packed)] //~ ERROR: E0517
+   |        ^^^^^^
+15 | enum Foo2 {Bar, Baz}
+   | -------------------- not a struct or union
+
+error[E0517]: attribute should be applied to enum
+  --> $DIR/E0517.rs:17:8
+   |
+17 | #[repr(u8)] //~ ERROR: E0517
+   |        ^^
+18 | struct Foo3 {bar: bool, baz: bool}
+   | ---------------------------------- not an enum
+
+error[E0517]: attribute should be applied to struct, enum or union
+  --> $DIR/E0517.rs:20:8
+   |
+20 |   #[repr(C)] //~ ERROR: E0517
+   |          ^
+21 | / impl Foo3 {
+22 | | }
+   | |_- not a struct, enum or union
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/error-codes/E0518.rs b/src/test/ui/error-codes/E0518.rs
new file mode 100644 (file)
index 0000000..6d5b6e4
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[inline(always)] //~ ERROR: E0518
+struct Foo;
+
+#[inline(never)] //~ ERROR: E0518
+impl Foo {
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0518.stderr b/src/test/ui/error-codes/E0518.stderr
new file mode 100644 (file)
index 0000000..99a4a63
--- /dev/null
@@ -0,0 +1,19 @@
+error[E0518]: attribute should be applied to function
+  --> $DIR/E0518.rs:11:1
+   |
+11 | #[inline(always)] //~ ERROR: E0518
+   | ^^^^^^^^^^^^^^^^^
+12 | struct Foo;
+   | ----------- not a function
+
+error[E0518]: attribute should be applied to function
+  --> $DIR/E0518.rs:14:1
+   |
+14 |   #[inline(never)] //~ ERROR: E0518
+   |   ^^^^^^^^^^^^^^^^
+15 | / impl Foo {
+16 | | }
+   | |_- not a function
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0520.rs b/src/test/ui/error-codes/E0520.rs
new file mode 100644 (file)
index 0000000..eae5b11
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(specialization)]
+
+trait SpaceLlama {
+    fn fly(&self);
+}
+
+impl<T> SpaceLlama for T {
+    default fn fly(&self) {}
+}
+
+impl<T: Clone> SpaceLlama for T {
+    fn fly(&self) {}
+}
+
+impl SpaceLlama for i32 {
+    default fn fly(&self) {}
+    //~^ ERROR E0520
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0520.stderr b/src/test/ui/error-codes/E0520.stderr
new file mode 100644 (file)
index 0000000..272c388
--- /dev/null
@@ -0,0 +1,15 @@
+error[E0520]: `fly` specializes an item from a parent `impl`, but that item is not marked `default`
+  --> $DIR/E0520.rs:26:5
+   |
+21 | / impl<T: Clone> SpaceLlama for T {
+22 | |     fn fly(&self) {}
+23 | | }
+   | |_- parent `impl` is here
+...
+26 |       default fn fly(&self) {}
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `fly`
+   |
+   = note: to specialize, `fly` in the parent `impl` must be marked `default`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0522.rs b/src/test/ui/error-codes/E0522.rs
new file mode 100644 (file)
index 0000000..3d43778
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(lang_items)]
+
+#[lang = "cookie"]
+fn cookie() -> ! {
+//~^^ ERROR definition of an unknown language item: `cookie` [E0522]
+    loop {}
+}
diff --git a/src/test/ui/error-codes/E0522.stderr b/src/test/ui/error-codes/E0522.stderr
new file mode 100644 (file)
index 0000000..819fab0
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0601]: main function not found
+
+error[E0522]: definition of an unknown language item: `cookie`
+  --> $DIR/E0522.rs:13:1
+   |
+13 | #[lang = "cookie"]
+   | ^^^^^^^^^^^^^^^^^^ definition of unknown language item `cookie`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0527.rs b/src/test/ui/error-codes/E0527.rs
new file mode 100644 (file)
index 0000000..67d222e
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(slice_patterns)]
+
+fn main() {
+    let r = &[1, 2, 3, 4];
+    match r {
+        &[a, b] => {
+            //~^ ERROR E0527
+            println!("a={}, b={}", a, b);
+        }
+    }
+}
diff --git a/src/test/ui/error-codes/E0527.stderr b/src/test/ui/error-codes/E0527.stderr
new file mode 100644 (file)
index 0000000..7cd705e
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0527]: pattern requires 2 elements but array has 4
+  --> $DIR/E0527.rs:16:10
+   |
+16 |         &[a, b] => {
+   |          ^^^^^^ expected 4 elements
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0528.rs b/src/test/ui/error-codes/E0528.rs
new file mode 100644 (file)
index 0000000..e2aa2c0
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(slice_patterns)]
+
+fn main() {
+    let r = &[1, 2];
+    match r {
+        &[a, b, c, rest..] => {
+        //~^ ERROR E0528
+        }
+    }
+}
diff --git a/src/test/ui/error-codes/E0528.stderr b/src/test/ui/error-codes/E0528.stderr
new file mode 100644 (file)
index 0000000..ff75b07
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0528]: pattern requires at least 3 elements but array has 2
+  --> $DIR/E0528.rs:16:10
+   |
+16 |         &[a, b, c, rest..] => {
+   |          ^^^^^^^^^^^^^^^^^ pattern cannot match array of 2 elements
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0529.rs b/src/test/ui/error-codes/E0529.rs
new file mode 100644 (file)
index 0000000..5262ad7
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(slice_patterns)]
+
+fn main() {
+    let r: f32 = 1.0;
+    match r {
+        [a, b] => {
+        //~^ ERROR E0529
+        }
+    }
+}
diff --git a/src/test/ui/error-codes/E0529.stderr b/src/test/ui/error-codes/E0529.stderr
new file mode 100644 (file)
index 0000000..be9039b
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0529]: expected an array or slice, found `f32`
+  --> $DIR/E0529.rs:16:9
+   |
+16 |         [a, b] => {
+   |         ^^^^^^ pattern cannot match with input type `f32`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0530.rs b/src/test/ui/error-codes/E0530.rs
new file mode 100644 (file)
index 0000000..4f674d0
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    static TEST: i32 = 0;
+
+    let r: (i32, i32) = (0, 0);
+    match r {
+        TEST => {} //~ ERROR E0530
+    }
+}
diff --git a/src/test/ui/error-codes/E0530.stderr b/src/test/ui/error-codes/E0530.stderr
new file mode 100644 (file)
index 0000000..7c0306c
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0530]: match bindings cannot shadow statics
+  --> $DIR/E0530.rs:16:9
+   |
+12 |     static TEST: i32 = 0;
+   |     --------------------- a static `TEST` is defined here
+...
+16 |         TEST => {} //~ ERROR E0530
+   |         ^^^^ cannot be named the same as a static
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0532.rs b/src/test/ui/error-codes/E0532.rs
new file mode 100644 (file)
index 0000000..5dc3b5f
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let value = 1;
+
+    match SomeStruct(value) {
+        StructConst1(_) => { },
+        //~^ ERROR expected tuple struct/variant, found constant `StructConst1`
+        _ => { },
+    }
+
+    struct SomeStruct(u8);
+
+    const StructConst1 : SomeStruct = SomeStruct(1);
+    const StructConst2 : SomeStruct = SomeStruct(2);
+}
diff --git a/src/test/ui/error-codes/E0532.stderr b/src/test/ui/error-codes/E0532.stderr
new file mode 100644 (file)
index 0000000..4eb91ce
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0532]: expected tuple struct/variant, found constant `StructConst1`
+  --> $DIR/E0532.rs:15:9
+   |
+15 |         StructConst1(_) => { },
+   |         ^^^^^^^^^^^^ not a tuple struct/variant
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0534.rs b/src/test/ui/error-codes/E0534.rs
new file mode 100644 (file)
index 0000000..fc465b2
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[inline()] //~ ERROR E0534
+pub fn something() {}
+
+fn main() {
+    something();
+}
diff --git a/src/test/ui/error-codes/E0534.stderr b/src/test/ui/error-codes/E0534.stderr
new file mode 100644 (file)
index 0000000..fe7a548
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0534]: expected one argument
+  --> $DIR/E0534.rs:11:1
+   |
+11 | #[inline()] //~ ERROR E0534
+   | ^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0558.rs b/src/test/ui/error-codes/E0558.rs
new file mode 100644 (file)
index 0000000..64a6ee4
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[export_name]
+//~^ ERROR E0558
+
+pub fn something() {}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0558.stderr b/src/test/ui/error-codes/E0558.stderr
new file mode 100644 (file)
index 0000000..c116201
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0558]: export_name attribute has invalid format
+  --> $DIR/E0558.rs:11:1
+   |
+11 | #[export_name]
+   | ^^^^^^^^^^^^^^ did you mean #[export_name="*"]?
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0559.rs b/src/test/ui/error-codes/E0559.rs
new file mode 100644 (file)
index 0000000..da0f692
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Field {
+    Fool { x: u32 },
+}
+
+fn main() {
+    let s = Field::Fool { joke: 0 };
+    //~^ ERROR E0559
+}
diff --git a/src/test/ui/error-codes/E0559.stderr b/src/test/ui/error-codes/E0559.stderr
new file mode 100644 (file)
index 0000000..5d145a9
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0559]: variant `Field::Fool` has no field named `joke`
+  --> $DIR/E0559.rs:16:27
+   |
+16 |     let s = Field::Fool { joke: 0 };
+   |                           ^^^^^ `Field::Fool` does not have this field
+   |
+   = note: available fields are: `x`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0560.rs b/src/test/ui/error-codes/E0560.rs
new file mode 100644 (file)
index 0000000..bbb7f08
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Simba {
+    mother: u32,
+}
+
+fn main() {
+    let s = Simba { mother: 1, father: 0 };
+    //~^ ERROR E0560
+}
diff --git a/src/test/ui/error-codes/E0560.stderr b/src/test/ui/error-codes/E0560.stderr
new file mode 100644 (file)
index 0000000..a0185aa
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0560]: struct `Simba` has no field named `father`
+  --> $DIR/E0560.rs:16:32
+   |
+16 |     let s = Simba { mother: 1, father: 0 };
+   |                                ^^^^^^^ `Simba` does not have this field
+   |
+   = note: available fields are: `mother`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0565-1.rs b/src/test/ui/error-codes/E0565-1.rs
new file mode 100644 (file)
index 0000000..d3e68c7
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(attr_literals)]
+
+// deprecated doesn't currently support literals
+#[deprecated("since")] //~ ERROR E0565
+fn f() {  }
+
+fn main() {  }
diff --git a/src/test/ui/error-codes/E0565-1.stderr b/src/test/ui/error-codes/E0565-1.stderr
new file mode 100644 (file)
index 0000000..65b917a
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0565]: unsupported literal
+  --> $DIR/E0565-1.rs:14:14
+   |
+14 | #[deprecated("since")] //~ ERROR E0565
+   |              ^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0565.rs b/src/test/ui/error-codes/E0565.rs
new file mode 100644 (file)
index 0000000..b2d3692
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(attr_literals)]
+
+// repr currently doesn't support literals
+#[repr("C")] //~ ERROR E0565
+struct A {  }
+
+fn main() {  }
diff --git a/src/test/ui/error-codes/E0565.stderr b/src/test/ui/error-codes/E0565.stderr
new file mode 100644 (file)
index 0000000..0041b76
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0565]: unsupported literal
+  --> $DIR/E0565.rs:14:8
+   |
+14 | #[repr("C")] //~ ERROR E0565
+   |        ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0572.rs b/src/test/ui/error-codes/E0572.rs
new file mode 100644 (file)
index 0000000..bbaab10
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+const FOO: u32 = return 0; //~ ERROR E0572
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0572.stderr b/src/test/ui/error-codes/E0572.stderr
new file mode 100644 (file)
index 0000000..cad313b
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0572]: return statement outside of function body
+  --> $DIR/E0572.rs:11:18
+   |
+11 | const FOO: u32 = return 0; //~ ERROR E0572
+   |                  ^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0582.rs b/src/test/ui/error-codes/E0582.rs
new file mode 100644 (file)
index 0000000..5e6f65a
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright 2014 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// This test was derived from the wasm and parsell crates.  They
+// stopped compiling when #32330 is fixed.
+
+#![allow(dead_code, unused_variables)]
+
+use std::str::Chars;
+
+pub trait HasOutput<Ch, Str> {
+    type Output;
+}
+
+#[derive(Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Debug)]
+pub enum Token<'a> {
+    Begin(&'a str)
+}
+
+fn mk_unexpected_char_err<'a>() -> Option<&'a i32> {
+    unimplemented!()
+}
+
+fn foo<'a>(data: &mut Chars<'a>) {
+    bar(mk_unexpected_char_err)
+}
+
+fn bar<F>(t: F)
+    // No type can satisfy this requirement, since `'a` does not
+    // appear in any of the input types:
+    where F: for<'a> Fn() -> Option<&'a i32>
+    //~^ ERROR E0582
+{
+}
+
+fn baz<F>(t: F)
+    // No type can satisfy this requirement, since `'a` does not
+    // appear in any of the input types:
+    where F: for<'a> Iterator<Item=&'a i32>
+    //~^ ERROR E0582
+{
+}
+
+fn main() {
+}
diff --git a/src/test/ui/error-codes/E0582.stderr b/src/test/ui/error-codes/E0582.stderr
new file mode 100644 (file)
index 0000000..ac20683
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
+  --> $DIR/E0582.rs:38:30
+   |
+38 |     where F: for<'a> Fn() -> Option<&'a i32>
+   |                              ^^^^^^^^^^^^^^^
+
+error[E0582]: binding for associated type `Item` references lifetime `'a`, which does not appear in the trait input types
+  --> $DIR/E0582.rs:46:31
+   |
+46 |     where F: for<'a> Iterator<Item=&'a i32>
+   |                               ^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0585.rs b/src/test/ui/error-codes/E0585.rs
new file mode 100644 (file)
index 0000000..1acaf8c
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    /// Hello! I'm useless...
+    //~^ ERROR E0585
+}
diff --git a/src/test/ui/error-codes/E0585.stderr b/src/test/ui/error-codes/E0585.stderr
new file mode 100644 (file)
index 0000000..49967f4
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/E0585.rs:12:5
+   |
+12 |     /// Hello! I'm useless...
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0586.rs b/src/test/ui/error-codes/E0586.rs
new file mode 100644 (file)
index 0000000..c1bfc5c
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
+    let x = &tmp[1..=]; //~ ERROR E0586
+}
diff --git a/src/test/ui/error-codes/E0586.stderr b/src/test/ui/error-codes/E0586.stderr
new file mode 100644 (file)
index 0000000..3cf16bd
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0586]: inclusive range with no end
+  --> $DIR/E0586.rs:13:22
+   |
+13 |     let x = &tmp[1..=]; //~ ERROR E0586
+   |                      ^
+   |
+   = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0597.rs b/src/test/ui/error-codes/E0597.rs
new file mode 100644 (file)
index 0000000..2f4a1da
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo<'a> {
+    x: Option<&'a u32>,
+}
+
+fn main() {
+    let mut x = Foo { x: None };
+    let y = 0;
+    x.x = Some(&y);
+    //~^ `y` does not live long enough [E0597]
+}
diff --git a/src/test/ui/error-codes/E0597.stderr b/src/test/ui/error-codes/E0597.stderr
new file mode 100644 (file)
index 0000000..7316ee6
--- /dev/null
@@ -0,0 +1,13 @@
+error[E0597]: `y` does not live long enough
+  --> $DIR/E0597.rs:18:17
+   |
+18 |     x.x = Some(&y);
+   |                 ^ borrowed value does not live long enough
+19 |     //~^ `y` does not live long enough [E0597]
+20 | }
+   | - `y` dropped here while still borrowed
+   |
+   = note: values in a scope are dropped in the opposite order they are created
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0599.rs b/src/test/ui/error-codes/E0599.rs
new file mode 100644 (file)
index 0000000..30fca2b
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo;
+
+fn main() {
+    || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599
+}
diff --git a/src/test/ui/error-codes/E0599.stderr b/src/test/ui/error-codes/E0599.stderr
new file mode 100644 (file)
index 0000000..0274506
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope
+  --> $DIR/E0599.rs:14:15
+   |
+11 | struct Foo;
+   | ----------- associated item `NotEvenReal` not found for this
+...
+14 |     || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599
+   |               ^^^^^^^^^^^^^^^^^^ associated item not found in `Foo`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0600.rs b/src/test/ui/error-codes/E0600.rs
new file mode 100644 (file)
index 0000000..5457ff2
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    !"a"; //~ ERROR E0600
+}
diff --git a/src/test/ui/error-codes/E0600.stderr b/src/test/ui/error-codes/E0600.stderr
new file mode 100644 (file)
index 0000000..fec5f41
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0600]: cannot apply unary operator `!` to type `&'static str`
+  --> $DIR/E0600.rs:12:5
+   |
+12 |     !"a"; //~ ERROR E0600
+   |     ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0602.rs b/src/test/ui/error-codes/E0602.rs
new file mode 100644 (file)
index 0000000..cc3e436
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags:-D bogus
+
+// error-pattern:E0602
+// error-pattern:requested on the command line with `-D bogus`
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0602.stderr b/src/test/ui/error-codes/E0602.stderr
new file mode 100644 (file)
index 0000000..cb6c053
--- /dev/null
@@ -0,0 +1,6 @@
+error[E0602]: unknown lint: `bogus`
+  |
+  = note: requested on the command line with `-D bogus`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0603.rs b/src/test/ui/error-codes/E0603.rs
new file mode 100644 (file)
index 0000000..1cc9f6b
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod SomeModule {
+    const PRIVATE: u32 = 0x_a_bad_1dea_u32;
+}
+
+fn main() {
+    SomeModule::PRIVATE; //~ ERROR E0603
+}
diff --git a/src/test/ui/error-codes/E0603.stderr b/src/test/ui/error-codes/E0603.stderr
new file mode 100644 (file)
index 0000000..1d8e2fa
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0603]: constant `PRIVATE` is private
+  --> $DIR/E0603.rs:16:5
+   |
+16 |     SomeModule::PRIVATE; //~ ERROR E0603
+   |     ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0604.rs b/src/test/ui/error-codes/E0604.rs
new file mode 100644 (file)
index 0000000..c5bf3a7
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    1u32 as char; //~ ERROR E0604
+}
diff --git a/src/test/ui/error-codes/E0604.stderr b/src/test/ui/error-codes/E0604.stderr
new file mode 100644 (file)
index 0000000..78d1c4d
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0604]: only `u8` can be cast as `char`, not `u32`
+  --> $DIR/E0604.rs:12:5
+   |
+12 |     1u32 as char; //~ ERROR E0604
+   |     ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0605.rs b/src/test/ui/error-codes/E0605.rs
new file mode 100644 (file)
index 0000000..4b5b8be
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = 0u8;
+    x as Vec<u8>; //~ ERROR E0605
+
+    let v = 0 as *const u8;
+    v as &u8; //~ ERROR E0605
+}
diff --git a/src/test/ui/error-codes/E0605.stderr b/src/test/ui/error-codes/E0605.stderr
new file mode 100644 (file)
index 0000000..0b44de2
--- /dev/null
@@ -0,0 +1,18 @@
+error[E0605]: non-primitive cast: `u8` as `std::vec::Vec<u8>`
+  --> $DIR/E0605.rs:13:5
+   |
+13 |     x as Vec<u8>; //~ ERROR E0605
+   |     ^^^^^^^^^^^^
+   |
+   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+
+error[E0605]: non-primitive cast: `*const u8` as `&u8`
+  --> $DIR/E0605.rs:16:5
+   |
+16 |     v as &u8; //~ ERROR E0605
+   |     ^^^^^^^^
+   |
+   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0606.rs b/src/test/ui/error-codes/E0606.rs
new file mode 100644 (file)
index 0000000..5507173
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    &0u8 as u8; //~ ERROR E0606
+}
diff --git a/src/test/ui/error-codes/E0606.stderr b/src/test/ui/error-codes/E0606.stderr
new file mode 100644 (file)
index 0000000..17051da
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0606]: casting `&u8` as `u8` is invalid
+  --> $DIR/E0606.rs:12:5
+   |
+12 |     &0u8 as u8; //~ ERROR E0606
+   |     ^^^^^^^^^^ cannot cast `&u8` as `u8`
+   |
+help: did you mean `*&0u8`?
+  --> $DIR/E0606.rs:12:5
+   |
+12 |     &0u8 as u8; //~ ERROR E0606
+   |     ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0607.rs b/src/test/ui/error-codes/E0607.rs
new file mode 100644 (file)
index 0000000..fa761f2
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let v = 0 as *const u8;
+    v as *const [u8]; //~ ERROR E0607
+}
diff --git a/src/test/ui/error-codes/E0607.stderr b/src/test/ui/error-codes/E0607.stderr
new file mode 100644 (file)
index 0000000..5dfe6ad
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]`
+  --> $DIR/E0607.rs:13:5
+   |
+13 |     v as *const [u8]; //~ ERROR E0607
+   |     ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0608.rs b/src/test/ui/error-codes/E0608.rs
new file mode 100644 (file)
index 0000000..d47356a
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    0u8[2]; //~ ERROR E0608
+}
diff --git a/src/test/ui/error-codes/E0608.stderr b/src/test/ui/error-codes/E0608.stderr
new file mode 100644 (file)
index 0000000..ab75fe8
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0608]: cannot index into a value of type `u8`
+  --> $DIR/E0608.rs:12:5
+   |
+12 |     0u8[2]; //~ ERROR E0608
+   |     ^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0609.rs b/src/test/ui/error-codes/E0609.rs
new file mode 100644 (file)
index 0000000..ddfd9d5
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    x: u32,
+}
+struct Bar;
+
+fn main() {
+    let x = Foo { x: 0 };
+    let _ = x.foo; //~ ERROR E0609
+
+    let y = Bar;
+    y.1; //~ ERROR E0609
+}
diff --git a/src/test/ui/error-codes/E0609.stderr b/src/test/ui/error-codes/E0609.stderr
new file mode 100644 (file)
index 0000000..561164c
--- /dev/null
@@ -0,0 +1,16 @@
+error[E0609]: no field `foo` on type `Foo`
+  --> $DIR/E0609.rs:18:15
+   |
+18 |     let _ = x.foo; //~ ERROR E0609
+   |               ^^^ unknown field
+   |
+   = note: available fields are: `x`
+
+error[E0609]: no field `1` on type `Bar`
+  --> $DIR/E0609.rs:21:5
+   |
+21 |     y.1; //~ ERROR E0609
+   |     ^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0610.rs b/src/test/ui/error-codes/E0610.rs
new file mode 100644 (file)
index 0000000..522d8b0
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = 0;
+    let _ = x.foo; //~ ERROR E0610
+}
diff --git a/src/test/ui/error-codes/E0610.stderr b/src/test/ui/error-codes/E0610.stderr
new file mode 100644 (file)
index 0000000..351e920
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
+  --> $DIR/E0610.rs:13:15
+   |
+13 |     let _ = x.foo; //~ ERROR E0610
+   |               ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0611.rs b/src/test/ui/error-codes/E0611.rs
new file mode 100644 (file)
index 0000000..1e392d1
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod a {
+    pub struct Foo(u32);
+
+    impl Foo {
+        pub fn new() -> Foo { Foo(0) }
+    }
+}
+
+fn main() {
+   let y = a::Foo::new();
+   y.0; //~ ERROR E0611
+}
diff --git a/src/test/ui/error-codes/E0611.stderr b/src/test/ui/error-codes/E0611.stderr
new file mode 100644 (file)
index 0000000..33fe78b
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0611]: field `0` of tuple-struct `a::Foo` is private
+  --> $DIR/E0611.rs:21:4
+   |
+21 |    y.0; //~ ERROR E0611
+   |    ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0612.rs b/src/test/ui/error-codes/E0612.rs
new file mode 100644 (file)
index 0000000..429a8bb
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo(u32);
+
+fn main() {
+   let y = Foo(0);
+   y.1; //~ ERROR E0612
+}
diff --git a/src/test/ui/error-codes/E0612.stderr b/src/test/ui/error-codes/E0612.stderr
new file mode 100644 (file)
index 0000000..21fdaf8
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0612]: attempted out-of-bounds tuple index `1` on type `Foo`
+  --> $DIR/E0612.rs:15:4
+   |
+15 |    y.1; //~ ERROR E0612
+   |    ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0614.rs b/src/test/ui/error-codes/E0614.rs
new file mode 100644 (file)
index 0000000..909f0eb
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let y = 0u32;
+    *y; //~ ERROR E0614
+}
diff --git a/src/test/ui/error-codes/E0614.stderr b/src/test/ui/error-codes/E0614.stderr
new file mode 100644 (file)
index 0000000..242cc36
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0614]: type `u32` cannot be dereferenced
+  --> $DIR/E0614.rs:13:5
+   |
+13 |     *y; //~ ERROR E0614
+   |     ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0615.rs b/src/test/ui/error-codes/E0615.rs
new file mode 100644 (file)
index 0000000..abfa93d
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo {
+    x: u32,
+}
+
+impl Foo {
+    fn method(&self) {}
+}
+
+fn main() {
+    let f = Foo { x: 0 };
+    f.method; //~ ERROR E0615
+}
diff --git a/src/test/ui/error-codes/E0615.stderr b/src/test/ui/error-codes/E0615.stderr
new file mode 100644 (file)
index 0000000..fb3f926
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0615]: attempted to take value of method `method` on type `Foo`
+  --> $DIR/E0615.rs:21:7
+   |
+21 |     f.method; //~ ERROR E0615
+   |       ^^^^^^
+   |
+   = help: maybe a `()` to call it is missing?
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0616.rs b/src/test/ui/error-codes/E0616.rs
new file mode 100644 (file)
index 0000000..2fd9f94
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod a {
+    pub struct Foo {
+        x: u32,
+    }
+
+    impl Foo {
+        pub fn new() -> Foo { Foo { x: 0 } }
+    }
+}
+
+fn main() {
+    let f = a::Foo::new();
+    f.x; //~ ERROR E0616
+}
diff --git a/src/test/ui/error-codes/E0616.stderr b/src/test/ui/error-codes/E0616.stderr
new file mode 100644 (file)
index 0000000..1dccd06
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0616]: field `x` of struct `a::Foo` is private
+  --> $DIR/E0616.rs:23:5
+   |
+23 |     f.x; //~ ERROR E0616
+   |     ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0617.rs b/src/test/ui/error-codes/E0617.rs
new file mode 100644 (file)
index 0000000..9375fd9
--- /dev/null
@@ -0,0 +1,38 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-tidy-linelength
+
+extern {
+    fn printf(c: *const i8, ...);
+}
+
+fn main() {
+    unsafe {
+        printf(::std::ptr::null(), 0f32);
+        //~^ ERROR can't pass `f32` to variadic function
+        //~| HELP cast the value to `c_double`
+        printf(::std::ptr::null(), 0i8);
+        //~^ ERROR can't pass `i8` to variadic function
+        //~| HELP cast the value to `c_int`
+        printf(::std::ptr::null(), 0i16);
+        //~^ ERROR can't pass `i16` to variadic function
+        //~| HELP cast the value to `c_int`
+        printf(::std::ptr::null(), 0u8);
+        //~^ ERROR can't pass `u8` to variadic function
+        //~| HELP cast the value to `c_uint`
+        printf(::std::ptr::null(), 0u16);
+        //~^ ERROR can't pass `u16` to variadic function
+        //~| HELP cast the value to `c_uint`
+        printf(::std::ptr::null(), printf);
+        //~^ ERROR can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to variadic function
+        //~| HELP cast the value to `unsafe extern "C" fn(*const i8, ...)`
+    }
+}
diff --git a/src/test/ui/error-codes/E0617.stderr b/src/test/ui/error-codes/E0617.stderr
new file mode 100644 (file)
index 0000000..49d6353
--- /dev/null
@@ -0,0 +1,42 @@
+error[E0617]: can't pass `f32` to variadic function
+  --> $DIR/E0617.rs:19:36
+   |
+19 |         printf(::std::ptr::null(), 0f32);
+   |                                    ^^^^ help: cast the value to `c_double`: `0f32 as c_double`
+
+error[E0617]: can't pass `i8` to variadic function
+  --> $DIR/E0617.rs:22:36
+   |
+22 |         printf(::std::ptr::null(), 0i8);
+   |                                    ^^^ help: cast the value to `c_int`: `0i8 as c_int`
+
+error[E0617]: can't pass `i16` to variadic function
+  --> $DIR/E0617.rs:25:36
+   |
+25 |         printf(::std::ptr::null(), 0i16);
+   |                                    ^^^^ help: cast the value to `c_int`: `0i16 as c_int`
+
+error[E0617]: can't pass `u8` to variadic function
+  --> $DIR/E0617.rs:28:36
+   |
+28 |         printf(::std::ptr::null(), 0u8);
+   |                                    ^^^ help: cast the value to `c_uint`: `0u8 as c_uint`
+
+error[E0617]: can't pass `u16` to variadic function
+  --> $DIR/E0617.rs:31:36
+   |
+31 |         printf(::std::ptr::null(), 0u16);
+   |                                    ^^^^ help: cast the value to `c_uint`: `0u16 as c_uint`
+
+error[E0617]: can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to variadic function
+  --> $DIR/E0617.rs:34:36
+   |
+34 |         printf(::std::ptr::null(), printf);
+   |                                    ^^^^^^
+help: cast the value to `unsafe extern "C" fn(*const i8, ...)`
+   |
+34 |         printf(::std::ptr::null(), printf as unsafe extern "C" fn(*const i8, ...));
+   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 6 previous errors
+
diff --git a/src/test/ui/error-codes/E0618.rs b/src/test/ui/error-codes/E0618.rs
new file mode 100644 (file)
index 0000000..f46bdb9
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum X {
+    Entry,
+}
+
+fn main() {
+    X::Entry();
+    //~^ ERROR expected function, found enum variant `X::Entry` [E0618]
+    let x = 0i32;
+    x();
+    //~^ ERROR expected function, found `i32` [E0618]
+}
diff --git a/src/test/ui/error-codes/E0618.stderr b/src/test/ui/error-codes/E0618.stderr
new file mode 100644 (file)
index 0000000..8702437
--- /dev/null
@@ -0,0 +1,23 @@
+error[E0618]: expected function, found enum variant `X::Entry`
+  --> $DIR/E0618.rs:16:5
+   |
+12 |     Entry,
+   |     ----- `X::Entry` defined here
+...
+16 |     X::Entry();
+   |     ^^^^^^^^^^ not a function
+help: `X::Entry` is a unit variant, you need to write it without the parenthesis
+   |
+16 |     X::Entry;
+   |     ^^^^^^^^
+
+error[E0618]: expected function, found `i32`
+  --> $DIR/E0618.rs:19:5
+   |
+18 |     let x = 0i32;
+   |         - `i32` defined here
+19 |     x();
+   |     ^^^ not a function
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0619.rs b/src/test/ui/error-codes/E0619.rs
new file mode 100644 (file)
index 0000000..a5a5ff7
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x;
+
+    match x {
+        (..) => {} //~ ERROR E0619
+        _ => {}
+    }
+}
+
diff --git a/src/test/ui/error-codes/E0619.stderr b/src/test/ui/error-codes/E0619.stderr
new file mode 100644 (file)
index 0000000..cec336c
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0619]: the type of this value must be known in this context
+  --> $DIR/E0619.rs:15:9
+   |
+15 |         (..) => {} //~ ERROR E0619
+   |         ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0620.rs b/src/test/ui/error-codes/E0620.rs
new file mode 100644 (file)
index 0000000..5e945df
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620
+}
diff --git a/src/test/ui/error-codes/E0620.stderr b/src/test/ui/error-codes/E0620.stderr
new file mode 100644 (file)
index 0000000..564a947
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
+  --> $DIR/E0620.rs:12:16
+   |
+12 |     let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: consider using an implicit coercion to `&[usize]` instead
+  --> $DIR/E0620.rs:12:16
+   |
+12 |     let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.rs b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.rs
new file mode 100644 (file)
index 0000000..980461b
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test that we give the generic E0495 when one of the free regions is
+// bound in a closure (rather than suggesting a change to the signature
+// of the closure, which is not specified in `foo` but rather in `invoke`).
+
+// FIXME - This might be better as a UI test, but the finer details
+// of the error seem to vary on different machines.
+fn invoke<'a, F>(x: &'a i32, f: F) -> &'a i32
+where F: FnOnce(&'a i32, &i32) -> &'a i32
+{
+    let y = 22;
+    f(x, &y)
+}
+
+fn foo<'a>(x: &'a i32) {
+    invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr
new file mode 100644 (file)
index 0000000..c529a83
--- /dev/null
@@ -0,0 +1,29 @@
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
+  --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
+   |
+25 |     invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
+   |     ^^^^^^
+   |
+note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 25:16...
+  --> $DIR/E0621-does-not-trigger-for-closures.rs:25:16
+   |
+25 |     invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...so that reference does not outlive borrowed content
+  --> $DIR/E0621-does-not-trigger-for-closures.rs:25:45
+   |
+25 |     invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
+   |                                             ^
+note: but, the lifetime must be valid for the call at 25:5...
+  --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
+   |
+25 |     invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...so type `&i32` of expression is valid during the expression
+  --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
+   |
+25 |     invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0622.rs b/src/test/ui/error-codes/E0622.rs
new file mode 100644 (file)
index 0000000..f2bde5b
--- /dev/null
@@ -0,0 +1,16 @@
+// 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(intrinsics)]
+extern "rust-intrinsic" {
+    pub static breakpoint : unsafe extern "rust-intrinsic" fn();
+    //~^ ERROR intrinsic must be a function [E0622]
+}
+fn main() { unsafe { breakpoint(); } }
diff --git a/src/test/ui/error-codes/E0622.stderr b/src/test/ui/error-codes/E0622.stderr
new file mode 100644 (file)
index 0000000..977f44a
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0622]: intrinsic must be a function
+  --> $DIR/E0622.rs:13:5
+   |
+13 |     pub static breakpoint : unsafe extern "rust-intrinsic" fn();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected a function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0624.rs b/src/test/ui/error-codes/E0624.rs
new file mode 100644 (file)
index 0000000..952e0b3
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod inner {
+    pub struct Foo;
+
+    impl Foo {
+        fn method(&self) {}
+    }
+}
+
+fn main() {
+    let foo = inner::Foo;
+    foo.method(); //~ ERROR method `method` is private [E0624]
+}
diff --git a/src/test/ui/error-codes/E0624.stderr b/src/test/ui/error-codes/E0624.stderr
new file mode 100644 (file)
index 0000000..0afb05a
--- /dev/null
@@ -0,0 +1,8 @@
+error[E0624]: method `method` is private
+  --> $DIR/E0624.rs:21:9
+   |
+21 |     foo.method(); //~ ERROR method `method` is private [E0624]
+   |         ^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0637.rs b/src/test/ui/error-codes/E0637.rs
new file mode 100644 (file)
index 0000000..455529b
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+#![feature(underscore_lifetimes)]
+
+struct Foo<'a: '_>(&'a u8); //~ ERROR invalid lifetime bound name: `'_`
+fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_`
+
+struct Bar<'a>(&'a u8);
+impl<'a: '_> Bar<'a> { //~ ERROR invalid lifetime bound name: `'_`
+  fn bar() {}
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0637.stderr b/src/test/ui/error-codes/E0637.stderr
new file mode 100644 (file)
index 0000000..e314afd
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0637]: invalid lifetime bound name: `'_`
+  --> $DIR/E0637.rs:12:16
+   |
+12 | struct Foo<'a: '_>(&'a u8); //~ ERROR invalid lifetime bound name: `'_`
+   |                ^^ `'_` is a reserved lifetime name
+
+error[E0637]: invalid lifetime bound name: `'_`
+  --> $DIR/E0637.rs:13:12
+   |
+13 | fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_`
+   |            ^^ `'_` is a reserved lifetime name
+
+error[E0637]: invalid lifetime bound name: `'_`
+  --> $DIR/E0637.rs:16:10
+   |
+16 | impl<'a: '_> Bar<'a> { //~ ERROR invalid lifetime bound name: `'_`
+   |          ^^ `'_` is a reserved lifetime name
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/error-codes/E0657.rs b/src/test/ui/error-codes/E0657.rs
new file mode 100644 (file)
index 0000000..4595e41
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+#![allow(warnings)]
+#![feature(conservative_impl_trait, nested_impl_trait)]
+
+trait Id<T> {}
+trait Lt<'a> {}
+
+impl<'a> Lt<'a> for () {}
+impl<T> Id<T> for T {}
+
+fn free_fn_capture_hrtb_in_impl_trait()
+    -> impl for<'a> Id<impl Lt<'a>>
+        //~^ ERROR `impl Trait` can only capture lifetimes bound at the fn or impl level [E0657]
+{
+    ()
+}
+
+struct Foo;
+impl Foo {
+    fn impl_fn_capture_hrtb_in_impl_trait()
+        -> impl for<'a> Id<impl Lt<'a>>
+            //~^ ERROR `impl Trait` can only capture lifetimes bound at the fn or impl level
+    {
+        ()
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/error-codes/E0657.stderr b/src/test/ui/error-codes/E0657.stderr
new file mode 100644 (file)
index 0000000..d3b53d3
--- /dev/null
@@ -0,0 +1,14 @@
+error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level
+  --> $DIR/E0657.rs:20:32
+   |
+20 |     -> impl for<'a> Id<impl Lt<'a>>
+   |                                ^^
+
+error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level
+  --> $DIR/E0657.rs:29:36
+   |
+29 |         -> impl for<'a> Id<impl Lt<'a>>
+   |                                    ^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/error-codes/E0658.rs b/src/test/ui/error-codes/E0658.rs
new file mode 100644 (file)
index 0000000..d30068e
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2018 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let _ = ::std::u128::MAX; //~ ERROR E0658
+}
diff --git a/src/test/ui/error-codes/E0658.stderr b/src/test/ui/error-codes/E0658.stderr
new file mode 100644 (file)
index 0000000..c18d809
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0658]: use of unstable library feature 'i128' (see issue #35118)
+  --> $DIR/E0658.rs:12:13
+   |
+12 |     let _ = ::std::u128::MAX; //~ ERROR E0658
+   |             ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(i128)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0659.rs b/src/test/ui/error-codes/E0659.rs
new file mode 100644 (file)
index 0000000..4bd452b
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2018 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod moon {
+    pub fn foo() {}
+}
+
+mod earth {
+    pub fn foo() {}
+}
+
+mod collider {
+    pub use moon::*;
+    pub use earth::*;
+}
+
+fn main() {
+    collider::foo(); //~ ERROR E0659
+}
diff --git a/src/test/ui/error-codes/E0659.stderr b/src/test/ui/error-codes/E0659.stderr
new file mode 100644 (file)
index 0000000..c2410e2
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0659]: `foo` is ambiguous
+  --> $DIR/E0659.rs:25:5
+   |
+25 |     collider::foo(); //~ ERROR E0659
+   |     ^^^^^^^^^^^^^
+   |
+note: `foo` could refer to the name imported here
+  --> $DIR/E0659.rs:20:13
+   |
+20 |     pub use moon::*;
+   |             ^^^^^^^
+note: `foo` could also refer to the name imported here
+  --> $DIR/E0659.rs:21:13
+   |
+21 |     pub use earth::*;
+   |             ^^^^^^^^
+   = note: consider adding an explicit import of `foo` to disambiguate
+
+error: aborting due to previous error
+